Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract class to represent a service.

abstract

Hierarchy

  • Service

Index

Constructors

constructor

Properties

Protected context

Context of the code execution.

environmentManager

environmentManager: EnvironmentManager

info

info: Info

Info of the service.

schemas

schemas: Schema[]

List of service schemas.

selectedEnvironmentName

selectedEnvironmentName: string

type

type: string

Type of service.

Static DIRNAME

DIRNAME: string = __dirname

Static NAME

NAME: string

Accessors

Protected serviceDirectory

  • get serviceDirectory(): string

Methods

addSchema

  • Adds a Schema based off a Schema object.

    function

    addSchema

    memberof

    Service

    Parameters

    • schema: Schema

      Schema to add.

    Returns Schema

    The given Schema.

createGitIgnore

  • createGitIgnore(): Promise<void>
  • Create the .gitignore file.

    function

    createGitIgnore

    memberof

    Service

    Returns Promise<void>

createIgnoreFiles

  • createIgnoreFiles(): void

createREADME

  • createREADME(): void

getSchema

  • getSchema(identifier: string): Schema | null
  • Get a schema based on the identifier.

    function

    getSchema

    memberof

    Service

    Parameters

    • identifier: string

      Identifier of the Schema to get.

    Returns Schema | null

    Schema to return.

makeFileHeaderLines

  • makeFileHeaderLines(fileName: string): string[]
  • Makes the lines for file headers.

    function

    getFileHeaderLines

    memberof

    Service

    example

    // Example: returns file header for main.py serviceContext.getFileHeaderLines('main.py') // ['File: main.py', ...]

    Parameters

    • fileName: string

      Name of the file.

    Returns string[]

    Lines for file headers.

makeIgnoreComponents

  • makeIgnoreComponents(): string[]
  • Make the ingore components to get sent to the ignore generation service.

    function

    makeIgnoreComponents

    memberof

    Service

    Returns string[]

    Ignore components.

makeREADMELines

  • makeREADMELines(): string[]
  • Make the lines for the README file.

    function

    getREADMELines

    memberof

    Service

    Returns string[]

    Array of lines for the README.

postInit

  • postInit(): void
  • Event listener for after an initialization.

    function

    postInit

    memberof

    Service

    Returns void

postVersionBump

  • postVersionBump(): void
  • Event listener for after a version bump.

    function

    postVersionBump

    memberof

    Service

    Returns void

readTemplate

  • readTemplate(scope: string, fileName: string): string
  • Read the contents of the template file.

    function

    readTemplate

    memberof

    Service

    example

    // Returns the file content for main.py serviceContext.getTemplate('ServiceType', 'main.py') // app.run('0.0.0.0', port=80)

    Parameters

    • scope: string

      Scope of the service.

    • fileName: string

      Template name.

    Returns string

    Template contents.

removeSchema

  • removeSchema(identifier: string): boolean
  • Removes a Schema from it's identifier.

    function

    removeSchema

    memberof

    Service

    Parameters

    • identifier: string

      identifier of the Schema to remove.

    Returns boolean

    true if the Schema was removed.

serialize

write

  • write(): boolean
  • Writes the current Service from memory to disk.

    function

    write

    memberof

    Service

    Returns boolean

    true if successfull.

Static deserialize

  • Deserialize an object into an Service instance.

    function

    deserialize

    static
    abstract
    memberof

    Service

    Parameters

    Returns Service

    Service context object.

Static makeInitialData

Static makeObject

Generated using TypeDoc