Implements

  • ServerAttributes

Constructors

Properties

allocations?: Allocation[]
description: string
docker_image: string
egg?: RawEgg
egg_features: string[]
feature_limits: {
    allocations: number;
    backups: number;
    databases: number;
}
identifier: string
internal_id: string | number
invocation: string
is_installing: boolean
is_node_under_maintenance: boolean
is_suspended: boolean
is_transferring: boolean
limits: {
    cpu: number;
    disk: number;
    io: number;
    memory: number;
    oom_disabled: boolean;
    swap: number;
    threads?: null | string;
}
name: string
node: string
server_owner: boolean
sftp_details: {
    ip: string;
    port: number;
}
status: null | ServerStatus
subusers?: SubUser[]
uuid: string
variables?: Variable[]

Methods

  • Create a folder in a specific directory

    Parameters

    • dir: string
    • folderName: string

    Returns Promise<void>

  • Decompress a archive

    Parameters

    • dir: string
    • file: string | File

    Returns Promise<void>

  • Delete files in a specific directory

    Parameters

    • dir: string
    • files: (string | File)[]

    Returns Promise<void>

  • Rename files in a specific directory

    Parameters

    • dir: string
    • files: {
          from: string | File;
          to: string;
      }[]

    Returns Promise<void>

  • Send a console command to this server

    Parameters

    • command: string

    Returns Promise<void>

  • Set the description for this server

    Parameters

    • description: string

    Returns Promise<void>

  • Set the docker image for this server

    Parameters

    • image: string

    Returns Promise<void>

  • Upload a file

    Parameters

    • dir: string = '/'
    • file: string | Buffer | Blob
    • filename: string

    Returns Promise<void>

    A buffer, blob or the path to the file