l27

package module
v0.1.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 17 Imported by: 2

README

Golang wrapper for the Level27 API.

This library is a binding to the Level27 API.

The library is currently not complete and does not cover many of the functions/endpoints.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acl

type Acl struct {
	ID           IntID           `json:"id"`
	Object       string          `json:"object"`
	ObjectID     IntID           `json:"objectId"`
	Permissions  interface{}     `json:"permissions"`
	Extra        interface{}     `json:"extra"`
	Type         string          `json:"type"`
	Organisation OrganisationRef `json:"organisation"`
}

type AclAdd

type AclAdd struct {
	Organisation IntID `json:"organisation"`
}

type App

type App struct {
	AppRef
	Status         string `json:"status"`
	StatusCategory string `json:"statusCategory"`
	Organisation   struct {
		ID       IntID  `json:"id"`
		Name     string `json:"name"`
		Reseller struct {
			ID   IntID  `json:"id"`
			Name string `json:"name"`
		} `json:"reseller"`
	} `json:"organisation"`
	DtExpires     IntTime `json:"dtExpires"`
	BillingStatus string  `json:"billingStatus"`
	Components    []struct {
		ID               IntID  `json:"id"`
		Name             string `json:"name"`
		Category         string `json:"category"`
		AppComponentType string `json:"appcomponenttype"`
	} `json:"components"`
	CountTeams int32 `json:"countTeams"`
	Teams      []struct {
		ID             IntID  `json:"id"`
		Name           string `json:"name"`
		AdminOnly      bool   `json:"adminOnly"`
		OrganisationID IntID  `json:"organisationId"`
	} `json:"teams"`
	ExternalInfo string `json:"externalInfo"`
}

main structure of an app

type AppActionRequest

type AppActionRequest struct {
	Type string `json:"type"`
}

type needed to do an action on a system

type AppComponent

type AppComponent struct {
	App struct {
		ID             IntID  `json:"id"`
		Status         string `json:"status"`
		StatusCategory string `json:"statusCategory"`
	} `json:"app"`
	AppcomponentparameterDescriptions interface{}            `json:"appcomponentparameterDescriptions"`
	Appcomponentparameters            map[string]interface{} `json:"appcomponentparameters"`
	Appcomponenttype                  string                 `json:"appcomponenttype"`
	BillableitemDetailID              IntID                  `json:"billableitemDetailId"`
	Category                          string                 `json:"category"`
	ID                                IntID                  `json:"id"`
	Name                              string                 `json:"name"`
	Organisation                      struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"organisation"`
	Provider struct {
		ID   IntID       `json:"id"`
		Name interface{} `json:"name"`
	} `json:"provider"`
	Status     string  `json:"status"`
	LimitGroup *string `json:"limitGroup"`
	Attachment *struct {
		ID IntID `json:""`
	}
}

type appcomponent

type AppComponentAllowedActions added in v0.1.14

type AppComponentAllowedActions struct {
	Map map[string][]string
}

func (*AppComponentAllowedActions) UnmarshalJSON added in v0.1.14

func (b *AppComponentAllowedActions) UnmarshalJSON(data []byte) error

type AppComponentAvailableBackup

type AppComponentAvailableBackup struct {
	Date          string `json:"date"`
	ID            IntID  `json:"id"`
	RestoreSystem struct {
		Fqdn string `json:"fqdn"`
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"restoreSystem"`
	SnapshotName   string `json:"snapshotName"`
	Status         string `json:"status"`
	StatusCategory string `json:"statusCategory"`
	StorageUID     string `json:"storageUid"`
	System         struct {
		Fqdn string `json:"fqdn"`
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"system"`
	VolumeUID string `json:"volumeUid"`
}

type availablebackup for an appcomponent

type AppComponentCron added in v0.1.10

type AppComponentCron struct {
	ID           IntID  `json:"id"`
	Name         string `json:"name"`
	Command      string `json:"command"`
	Schedule     string `json:"schedule"`
	Status       string `json:"status"`
	Appcomponent struct {
		ID               IntID  `json:"id"`
		Name             string `json:"name"`
		Appcomponenttype string `json:"appcomponenttype"`
		Status           string `json:"status"`
		App              struct {
			ID IntID `json:"id"`
		} `json:"app"`
	} `json:"appcomponent"`
	StatusCategory string `json:"statusCategory"`
}

func (AppComponentCron) ToShort added in v0.1.10

func (cron AppComponentCron) ToShort() AppComponentCronShort

type AppComponentCronCreate added in v0.1.10

type AppComponentCronCreate struct {
	Name     string `json:"name"`
	Command  string `json:"command"`
	Schedule string `json:"schedule"`
}

type AppComponentCronShort added in v0.1.10

type AppComponentCronShort struct {
	ID           IntID  `json:"id"`
	Name         string `json:"name"`
	Command      string `json:"command"`
	Schedule     string `json:"schedule"`
	Status       string `json:"status"`
	Appcomponent struct {
		ID               IntID  `json:"id"`
		Name             string `json:"name"`
		Appcomponenttype string `json:"appcomponenttype"`
		Status           string `json:"status"`
	} `json:"appcomponent"`
	StatusCategory string `json:"statusCategory"`
}

type AppComponentCronUpdate added in v0.1.10

type AppComponentCronUpdate struct {
	Name     string `json:"name"`
	Command  string `json:"command"`
	Schedule string `json:"schedule"`
}

type AppComponentDomain added in v0.1.16

type AppComponentDomain struct {
	ID          IntID                          `json:"id"`
	Status      string                         `json:"status"`
	HandleDNS   bool                           `json:"handleDns"`
	DKIM        bool                           `json:"dkim"`
	DKIMRecords []AppComponentDomainDKIMRecord `json:"dkimRecords"`
	Domain      struct {
		ID            IntID  `json:"id"`
		Name          string `json:"name"`
		HandleDNS     bool   `json:"handleDns"`
		HandleMailDNS bool   `json:"handleMailDns"`
		Domaintype    struct {
			ID        IntID  `json:"id"`
			Extension string `json:"extension"`
		} `json:"domaintype"`
	} `json:"domain"`
	Appcomponent struct {
		ID               IntID  `json:"id"`
		Name             string `json:"name"`
		Appcomponenttype string `json:"appcomponenttype"`
	} `json:"appcomponent"`
	StatusCategory string `json:"statusCategory"`
}

func (AppComponentDomain) ToShort added in v0.1.16

type AppComponentDomainCreate added in v0.1.16

type AppComponentDomainCreate struct {
	Domain    IntID `json:"domain"`
	HandleDNS bool  `json:"handleDns"`
	DKIM      bool  `json:"dkim"`
}

type AppComponentDomainDKIMRecord added in v0.1.16

type AppComponentDomainDKIMRecord struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

type AppComponentDomainShort added in v0.1.16

type AppComponentDomainShort struct {
	ID          IntID                          `json:"id"`
	Status      string                         `json:"status"`
	HandleDNS   bool                           `json:"handleDns"`
	DKIM        bool                           `json:"dkim"`
	DKIMRecords []AppComponentDomainDKIMRecord `json:"dkimRecords"`
	Domain      struct {
		ID         IntID  `json:"id"`
		Name       string `json:"name"`
		Domaintype struct {
			ID        IntID  `json:"id"`
			Extension string `json:"extension"`
		} `json:"domaintype"`
	} `json:"domain"`
	Appcomponent struct {
		ID               IntID  `json:"id"`
		Name             string `json:"name"`
		Appcomponenttype string `json:"appcomponenttype"`
	} `json:"appcomponent"`
	StatusCategory string `json:"statusCategory"`
}

type AppComponentDomainUpdate added in v0.1.16

type AppComponentDomainUpdate struct {
	Domain    IntID `json:"domain"`
	HandleDNS bool  `json:"handleDns"`
	DKIM      bool  `json:"dkim"`
}

type AppComponentRefShort

type AppComponentRefShort struct {
	ID               IntID  `json:"id"`
	Name             string `json:"name"`
	Appcomponenttype string `json:"appcomponenttype"`
	Status           string `json:"status"`
	StatusCategory   string `json:"statusCategory"`
}

type AppComponentRestore

type AppComponentRestore struct {
	ID           IntID       `json:"id"`
	Filename     string      `json:"filename"`
	Size         interface{} `json:"size"`
	DtExpires    IntTime     `json:"dtExpires"`
	Status       string      `json:"status"`
	Appcomponent struct {
		ID                     IntID  `json:"id"`
		Name                   string `json:"name"`
		Appcomponenttype       string `json:"appcomponenttype"`
		Appcomponentparameters struct {
			Username string `json:"username"`
			Pass     string `json:"pass"`
		} `json:"appcomponentparameters"`
		Status string `json:"status"`
		App    struct {
			ID IntID `json:"id"`
		} `json:"app"`
	} `json:"appcomponent"`
	AvailableBackup struct {
		ID           IntID     `json:"id"`
		Date         string    `json:"date"`
		VolumeUID    string    `json:"volumeUid"`
		StorageUID   string    `json:"storageUid"`
		Status       IntStatus `json:"status"`
		SnapshotName string    `json:"snapshotName"`
		System       struct {
			ID           IntID       `json:"id"`
			Fqdn         string      `json:"fqdn"`
			CustomerFqdn interface{} `json:"customerFqdn"`
			Name         string      `json:"name"`
		} `json:"system"`
		RestoreSystem struct {
			ID           IntID       `json:"id"`
			Fqdn         string      `json:"fqdn"`
			CustomerFqdn interface{} `json:"customerFqdn"`
			Name         string      `json:"name"`
		} `json:"restoreSystem"`
	} `json:"availableBackup"`
}

Restore type for an app

type AppComponentRestoreRequest

type AppComponentRestoreRequest struct {
	Appcomponent    IntID `json:"appcomponent"`
	AvailableBackup IntID `json:"availableBackup"`
}

request type for new restore

type AppComponentTypeParameter

type AppComponentTypeParameter struct {
	Name        string `json:"name"`
	DisplayName struct {
		En string `json:"en"`
		Nl string `json:"nl"`
	} `json:"displayName"`
	Description struct {
		En string `json:"en"`
		Nl string `json:"nl"`
	} `json:"description"`
	Type               string      `json:"type"`
	DefaultValue       interface{} `json:"defaultValue"`
	Readonly           bool        `json:"readonly"`
	DisableEdit        bool        `json:"disableEdit"`
	Required           bool        `json:"required"`
	Received           bool        `json:"received"`
	Category           string      `json:"category"`
	PossibleValues     []string    `json:"possibleValues"`
	DisableEditAgency  bool        `json:"disableEditAgency"`
	DisableEditClassic bool        `json:"disableEditClassic"`
}

type AppComponentUrl

type AppComponentUrl struct {
	ID             IntID  `json:"id"`
	Content        string `json:"content"`
	HTTPS          bool   `json:"https"`
	Status         string `json:"status"`
	SslForce       bool   `json:"sslForce"`
	HandleDNS      bool   `json:"handleDns"`
	Authentication bool   `json:"authentication"`
	Caching        bool   `json:"caching"`
	Appcomponent   struct {
		ID               IntID  `json:"id"`
		Name             string `json:"name"`
		Appcomponenttype string `json:"appcomponenttype"`
		Status           string `json:"status"`
		App              struct {
			ID IntID `json:"id"`
		} `json:"app"`
		StatusCategory string `json:"statusCategory"`
	} `json:"appcomponent"`
	SslCertificate struct {
		ID                IntID  `json:"id"`
		Name              string `json:"name"`
		SslForce          bool   `json:"sslForce"`
		SslStatus         string `json:"sslStatus"`
		Status            string `json:"status"`
		App               AppRef `json:"app"`
		SslStatusCategory string `json:"sslStatusCategory"`
		StatusCategory    string `json:"statusCategory"`
	} `json:"sslCertificate"`
	StatusCategory       string `json:"statusCategory"`
	Type                 string `json:"type"`
	MatchingCertificates []struct {
		ID                IntID  `json:"id"`
		Name              string `json:"name"`
		SslStatus         string `json:"sslStatus"`
		App               AppRef `json:"app"`
		SslStatusCategory string `json:"sslStatusCategory"`
	} `json:"matchingCertificates"`
}

func (AppComponentUrl) ToShort

func (url AppComponentUrl) ToShort() AppComponentUrlShort

type AppComponentUrlCreate

type AppComponentUrlCreate struct {
	Authentication     bool   `json:"authentication"`
	Content            string `json:"content"`
	SslForce           bool   `json:"sslForce"`
	SslCertificate     *IntID `json:"sslCertificate"`
	HandleDns          bool   `json:"handleDns"`
	Caching            bool   `json:"caching"`
	AutoSslCertificate bool   `json:"autoSslCertificate"`
}

type AppComponentUrlShort

type AppComponentUrlShort struct {
	ID             IntID                     `json:"id"`
	Content        string                    `json:"content"`
	HTTPS          bool                      `json:"https"`
	Status         string                    `json:"status"`
	SslForce       bool                      `json:"sslForce"`
	HandleDNS      bool                      `json:"handleDns"`
	Authentication bool                      `json:"authentication"`
	Caching        bool                      `json:"caching"`
	Appcomponent   AppComponentRefShort      `json:"appcomponent"`
	SslCertificate AppSslCertificateRefShort `json:"sslCertificate"`
	StatusCategory string                    `json:"statusCategory"`
	SslStatus      interface{}               `json:"sslStatus"`
	Type           string                    `json:"type"`
}

type AppMigration

type AppMigration struct {
	ID                 IntID       `json:"id"`
	MigrationType      string      `json:"migrationType"`
	DtPlanned          interface{} `json:"dtPlanned"`
	Status             string      `json:"status"`
	ConfirmationStatus IntStatus   `json:"confirmationStatus"`
	App                AppRef      `json:"app"`

	MigrationItems []struct {
		ID                   IntID         `json:"id"`
		Type                 string        `json:"type"`
		Source               string        `json:"source"`
		SourceInformation    string        `json:"sourceInformation"`
		DestinationEntity    string        `json:"destinationEntity"`
		DestinationEntityID  IntID         `json:"destinationEntityId"`
		Status               string        `json:"status"`
		StatusCategory       string        `json:"statusCategory"`
		Ord                  int32         `json:"ord"`
		Sshkey               interface{}   `json:"sshkey"`
		InvestigationResults interface{}   `json:"investigationResults"`
		PreparationResults   []interface{} `json:"preparationResults"`
		PresyncResults       []interface{} `json:"presyncResults"`
		MigrationResults     []interface{} `json:"migrationResults"`
		Logs                 interface{}   `json:"logs"`
		Appcomponent         struct {
			ID                     IntID  `json:"id"`
			Name                   string `json:"name"`
			Appcomponenttype       string `json:"appcomponenttype"`
			Appcomponentparameters struct {
				User string `json:"user"`
				Pass string `json:"pass"`
				Host string `json:"host"`
			} `json:"appcomponentparameters"`
			Status         string `json:"status"`
			StatusCategory string `json:"statusCategory"`
		} `json:"appcomponent"`
		SourceExtraData struct {
			Appcomponentparameters struct {
				Pass string `json:"pass"`
				Host string `json:"host"`
				User string `json:"user"`
			} `json:"appcomponentparameters"`
			Status         string `json:"status"`
			StatusCategory string `json:"statusCategory"`
			System         struct {
				ID                    IntID  `json:"id"`
				Fqdn                  string `json:"fqdn"`
				CustomerFqdn          string `json:"customerFqdn"`
				Name                  string `json:"name"`
				Status                string `json:"status"`
				RunningStatus         string `json:"runningStatus"`
				Osv                   string `json:"osv"`
				StatusCategory        string `json:"statusCategory"`
				RunningStatusCategory string `json:"runningStatusCategory"`
			} `json:"system"`
		} `json:"sourceExtraData"`
		DestinationExtraData struct {
			ID                    IntID  `json:"id"`
			Name                  string `json:"name"`
			Fqdn                  string `json:"fqdn"`
			CustomerFqdn          string `json:"customerFqdn"`
			Status                string `json:"status"`
			StatusCategory        string `json:"statusCategory"`
			RunningStatus         string `json:"runningStatus"`
			RunningStatusCategory string `json:"runningStatusCategory"`
			Osv                   string `json:"osv"`
		} `json:"destinationExtraData"`
	} `json:"migrationItems"`
}

type app migration

type AppMigrationItem

type AppMigrationItem struct {
	Type                string      `json:"type"`
	Source              string      `json:"source"`
	SourceInfo          int32       `json:"sourceInformation"`
	DestinationEntity   string      `json:"destinationEntity"`
	DestinationEntityID IntID       `json:"destinationEntityId"`
	Ord                 int32       `json:"ord"`
	SshKey              interface{} `json:"sshkey"`
}

type AppMigrationItemValue

type AppMigrationItemValue map[string]interface{}

used to create migration key value pairs

type AppMigrationRequest

type AppMigrationRequest struct {
	MigrationType      string             `json:"migrationType"`
	DtPlanned          string             `json:"dtPlanned"`
	MigrationItemArray []AppMigrationItem `json:"migrationItemArray"`
}

request type for new migration

type AppMigrationUpdate

type AppMigrationUpdate struct {
	MigrationType string `json:"migrationType"`
	DtPlanned     string `json:"dtPlanned"`
}

type appMigration for update

type AppPostRequest

type AppPostRequest struct {
	Name         string  `json:"name"`
	Organisation IntID   `json:"organisation"`
	AutoTeams    []IntID `json:"autoTeams"`
	ExternalInfo string  `json:"externalInfo"`
}

type to create an app (post request)

type AppPutRequest

type AppPutRequest struct {
	Name         string   `json:"name"`
	Organisation IntID    `json:"organisation"`
	AutoTeams    []string `json:"autoTeams"`
}

type to update an app (put request)

type AppRef

type AppRef struct {
	ID   IntID  `json:"id"`
	Name string `json:"name"`
}

type AppSslCertificate

type AppSslCertificate struct {
	ID                 IntID       `json:"id"`
	Name               string      `json:"name"`
	SslType            string      `json:"sslType"`
	SslKey             string      `json:"sslKey"`
	NewSslKey          string      `json:"newSslKey"`
	SslCrt             string      `json:"sslCrt"`
	SslCabundle        string      `json:"sslCabundle"`
	AutoURLLink        bool        `json:"autoUrlLink"`
	SslForce           bool        `json:"sslForce"`
	SslStatus          string      `json:"sslStatus"`
	Status             string      `json:"status"`
	ReminderStatus     string      `json:"reminderStatus"`
	DtExpires          string      `json:"dtExpires"`
	ValidationParams   interface{} `json:"validationParams"`
	Source             interface{} `json:"source"`
	SslCertificateUrls []struct {
		ID                IntID       `json:"id"`
		Content           string      `json:"content"`
		SslStatus         string      `json:"sslStatus"`
		ErrorMsg          interface{} `json:"errorMsg"`
		SslStatusCategory string      `json:"sslStatusCategory"`
		ValidationType    string      `json:"validationType"`
	} `json:"sslCertificateUrls"`
	BillableitemDetail interface{} `json:"billableitemDetail"`
	StatusCategory     string      `json:"statusCategory"`
	SslStatusCategory  string      `json:"sslStatusCategory"`
	Urls               []struct {
		ID             IntID  `json:"id"`
		Content        string `json:"content"`
		Status         string `json:"status"`
		StatusCategory string `json:"statusCategory"`
	} `json:"urls"`
	MatchingUrls []string `json:"matchingUrls"`
}

type AppSslCertificateCreate

type AppSslCertificateCreate struct {
	Name                   string `json:"name"`
	SslType                string `json:"sslType"`
	AutoSslCertificateUrls string `json:"autoSslCertificateUrls"`
	AutoUrlLink            bool   `json:"autoUrlLink"`
	SslForce               bool   `json:"sslForce"`
}

type AppSslCertificateCreateOwn

type AppSslCertificateCreateOwn struct {
	AppSslCertificateCreate
	SslKey      string `json:"sslKey"`
	SslCrt      string `json:"sslCrt"`
	SslCabundle string `json:"sslCabundle"`
}

type AppSslCertificatePut

type AppSslCertificatePut struct {
	Name    string `json:"name"`
	SslType string `json:"sslType"`
}

type AppSslCertificateRefShort

type AppSslCertificateRefShort struct {
	ID                IntID  `json:"id"`
	Name              string `json:"name"`
	SslStatus         string `json:"sslStatus"`
	Status            string `json:"status"`
	App               AppRef `json:"app"`
	SslStatusCategory string `json:"sslStatusCategory"`
	StatusCategory    string `json:"statusCategory"`
}

type AppSslcertificateKey

type AppSslcertificateKey struct {
	SslKey string `json:"sslKey"`
}

type AppcomponentCategory

type AppcomponentCategory struct {
	Name string
}

type appcomponent category

type Appcomponenttype

type Appcomponenttype map[string]AppcomponenttypeServicetype

type appcomponenttype

type AppcomponenttypeServicetype

type AppcomponenttypeServicetype struct {
	Servicetype struct {
		Name                    string                      `json:"name"`
		Cookbook                string                      `json:"cookbook"`
		DisplayName             string                      `json:"displayName"`
		Description             string                      `json:"description"`
		URLPossible             bool                        `json:"urlPossible"`
		SSHKeyPossible          bool                        `json:"sshkeyPossible"`
		UpdateURLsOnUpdate      bool                        `json:"updateUrlsOnUpdate"`
		RestorePossible         bool                        `json:"restorePossible"`
		MigrationPossible       bool                        `json:"migrationPossible"`
		SelectingSystemPossible bool                        `json:"selectingSystemPossible"`
		APMPossible             bool                        `json:"apmPossible"`
		StatisticsPossible      bool                        `json:"statisticsPossible"`
		DisabledOnProduction    bool                        `json:"disabledOnProduction"`
		InvisibleOnProduction   bool                        `json:"invisibleOnProduction"`
		Runlist                 string                      `json:"runlist"`
		AllowedActions          AppComponentAllowedActions  `json:"allowedActions"`
		Category                string                      `json:"category"`
		Parameters              []AppComponentTypeParameter `json:"parameters"`
	} `json:"servicetype"`
}

type Attachment added in v0.1.15

type Attachment struct {
	ID             IntID   `json:"id"`
	Name           string  `json:"name"`
	Type           *string `json:"type"`
	EntityClass    string  `json:"entityClass"`
	EntityID       *IntID  `json:"entityId"`
	Filename       string  `json:"filename"`
	Status         string  `json:"status"`
	StatusCategory string  `json:"statusCategory"`
}

type AttachmentGetParams added in v0.1.15

type AttachmentGetParams struct {
	EntityClass string
	Type        string
}

type AttachmentUpload added in v0.1.15

type AttachmentUpload struct {
	Name         string  `json:"name"`
	EntityClass  string  `json:"entityClass"`
	EntityId     *IntID  `json:"entityId"`
	Organisation IntID   `json:"organisation"`
	File         string  `json:"file"`
	Type         *string `json:"type"`
}

type BillPostRequest

type BillPostRequest struct {
	ExternalInfo string `json:"externalInfo"`
}

request data for posting billableItem

type BillableItem

type BillableItem struct {
	ID                  IntID           `json:"id"`
	Organisation        OrganisationRef `json:"organisation"`
	PreventDeactivation bool            `json:"preventDeactivation"`
	Status              IntStatus       `json:"status"`
	StatusDisplay       string          `json:"statusDisplay"`
	Description         string          `json:"description"`
	AutoRenew           bool            `json:"autoRenew"`
	DtExpires           IntTime         `json:"dtExpires"`
	DtNextRenewal       IntTime         `json:"dtNextRenewal"`
	DocumentsExist      bool            `json:"documentsExist"`
	TotalPrice          int32           `json:"totalPrice"`
	Details             []struct {
		ManuallyAdded        interface{} `json:"manuallyAdded"`
		AllowToSkipInvoicing bool        `json:"allowToSkipInvoicing"`
		ID                   IntID       `json:"id"`
		Price                interface{} `json:"price"`
		DtExpires            interface{} `json:"dtExpires"`
		Quantity             int32       `json:"quantity"`
		Description          string      `json:"description"`
		Product              struct {
			ID                  string `json:"id"`
			Description         string `json:"description"`
			AllowQuantityChange bool   `json:"allowQuantityChange"`
		} `json:"product"`
		ProductPrice struct {
			ID       IntID     `json:"id"`
			Period   int32     `json:"perion"`
			Currency string    `json:"currency"`
			Price    string    `json:"price"`
			Timing   string    `json:"timing"`
			Status   IntStatus `json:"status"`
		} `json:"productPrice"`
		Type string `json:"Type"`
	} `json:"details"`
	Extra1       string `json:"extra1"`
	Extra2       string `json:"extra2"`
	ExternalInfo string `json:"externalInfo"`
	Agreement    struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"agreement"`
}

type BillableItemAgreement

type BillableItemAgreement struct {
	Agreement IntID `json:"agreement"`
}

request data for posting an agreement to a billableItem

type BillableItemDetailsPostRequest

type BillableItemDetailsPostRequest struct {
	Product     string `json:"product"`
	Description string `json:"description"`
	Price       int32  `json:"price"`
	DtExpires   string `json:"dtExpires"`
	Quantity    int32  `json:"quantity"`
}

request data for posting a detail for a billableItem

type BillableItemGet

type BillableItemGet struct {
	BillableItem BillableItem `json:"billableitem"`
}

returns the billable item for GET call

type BillableItemUpdateRequest

type BillableItemUpdateRequest struct {
	AutoRenew          bool   `json:"autoRenew"`
	Extra1             string `json:"extra1"`
	Extra2             string `json:"extra2"`
	ExternalInfo       string `json:"externalInfo"`
	PrevenDeactivation bool   `json:"preventDeactivation"`
	HideDetails        bool   `json:"hideDetails"`
}

request for updating a billable item

type BuggyMap

type BuggyMap[K comparable, V any] struct {
	Map map[K]V
}

Workaround for buggy API-responses that return JSON [] when it should be {}. Accepts [] and deserializes it as an empty map. Task: PL-7612

func (*BuggyMap[K, V]) MarshalJSON

func (b *BuggyMap[K, V]) MarshalJSON() ([]byte, error)

func (*BuggyMap[K, V]) UnmarshalJSON

func (b *BuggyMap[K, V]) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	BaseURL string

	HTTPClient *http.Client

	DefaultRequestHeaders map[string]string
	// contains filtered or unexported fields
}

Client defines the API Client structure

func NewAPIClient

func NewAPIClient(uri string, apiKey string) *Client

NewAPIClient creates a client for doing the API calls

func (*Client) App

func (c *Client) App(id IntID) (App, error)

Gets an app from the API

func (*Client) AppAction

func (c *Client) AppAction(appID IntID, action string) error

------------------------------------------------- APP ACTIONS (ACTIVATE / DEACTIVATE)------------------------------------------------- ---- ACTION (ACTIVATE OR DEACTIVATE) ON AN APP

func (*Client) AppComponentCreate

func (c *Client) AppComponentCreate(appID IntID, req interface{}) (AppComponent, error)

func (*Client) AppComponentCronAction added in v0.1.16

func (c *Client) AppComponentCronAction(appID IntID, componentID IntID, cronID IntID, actionType string) (AppComponentCron, error)

PUT /apps/{appID}/components/{componentID}/crons/{cronID}/actions

func (*Client) AppComponentCronCreate added in v0.1.10

func (c *Client) AppComponentCronCreate(appID IntID, componentID IntID, data AppComponentCronCreate) (AppComponentCron, error)

POST /apps/{appID}/components/{componentID}/crons

func (*Client) AppComponentCronDelete added in v0.1.10

func (c *Client) AppComponentCronDelete(appID IntID, componentID IntID, cronID IntID) error

DELETE /apps/{appID}/components/{componentID}/crons/{cronID}

func (*Client) AppComponentCronGetList added in v0.1.10

func (c *Client) AppComponentCronGetList(appID IntID, componentID IntID, params CommonGetParams) ([]AppComponentCronShort, error)

GET /apps/{appID}/components/{componentID}/crons

func (*Client) AppComponentCronGetSingle added in v0.1.10

func (c *Client) AppComponentCronGetSingle(appID IntID, componentID IntID, cronID IntID) (AppComponentCron, error)

GET /apps/{appID}/components/{componentID}/crons/{cronID}

func (*Client) AppComponentCronLookup added in v0.1.10

func (c *Client) AppComponentCronLookup(appID IntID, componentID IntID, name string) ([]AppComponentCronShort, error)

func (*Client) AppComponentCronUpdate added in v0.1.10

func (c *Client) AppComponentCronUpdate(appID IntID, componentID IntID, cronID IntID, data AppComponentCronUpdate) error

PUT /apps/{appID}/components/{componentID}/crons/{cronID}

func (*Client) AppComponentDomainCreate added in v0.1.16

func (c *Client) AppComponentDomainCreate(appID IntID, componentID IntID, data AppComponentDomainCreate) (AppComponentDomain, error)

POST /apps/{appID}/components/{componentID}/domains

func (*Client) AppComponentDomainDelete added in v0.1.16

func (c *Client) AppComponentDomainDelete(appID IntID, componentID IntID, domainID IntID) error

DELETE /apps/{appID}/components/{componentID}/domains/{domainID}

func (*Client) AppComponentDomainGetList added in v0.1.16

func (c *Client) AppComponentDomainGetList(appID IntID, componentID IntID, params CommonGetParams) ([]AppComponentDomainShort, error)

GET /apps/{appID}/components/{componentID}/domains

func (*Client) AppComponentDomainGetSingle added in v0.1.16

func (c *Client) AppComponentDomainGetSingle(appID IntID, componentID IntID, domainID IntID) (AppComponentDomain, error)

GET /apps/{appID}/components/{componentID}/domains/{domainID}

func (*Client) AppComponentDomainLookup added in v0.1.16

func (c *Client) AppComponentDomainLookup(appID IntID, componentID IntID, name string) ([]AppComponentDomainShort, error)

func (*Client) AppComponentDomainUpdate added in v0.1.16

func (c *Client) AppComponentDomainUpdate(appID IntID, componentID IntID, domainID IntID, data AppComponentDomainUpdate) error

PUT /apps/{appID}/components/{componentID}/domains/{domainID}

func (*Client) AppComponentGetSingle

func (c *Client) AppComponentGetSingle(appID IntID, id IntID) (AppComponent, error)

---- DESCRIBE COMPONENT (GET SINGLE COMPONENT)

func (*Client) AppComponentLookup

func (c *Client) AppComponentLookup(appID IntID, name string) ([]AppComponent, error)

GET componentID based on name

func (*Client) AppComponentRestoreCreate

func (c *Client) AppComponentRestoreCreate(appID IntID, req AppComponentRestoreRequest) (AppComponentRestore, error)

---- CREATE NEW RESTORE

func (*Client) AppComponentRestoreDownload

func (c *Client) AppComponentRestoreDownload(appID IntID, restoreID IntID, filename string) error

---- DOWNLOAD RESTORE FILE

func (*Client) AppComponentRestoresDelete

func (c *Client) AppComponentRestoresDelete(appID IntID, restoreID IntID) error

---- DELETE RESTORE

func (*Client) AppComponentRestoresGet

func (c *Client) AppComponentRestoresGet(appID IntID) ([]AppComponentRestore, error)

---- GET LIST OF APP RESTORES

func (*Client) AppComponentUpdate

func (c *Client) AppComponentUpdate(appID IntID, appComponentID IntID, req interface{}) error

func (*Client) AppComponentUrlCreate

func (c *Client) AppComponentUrlCreate(appID IntID, componentID IntID, create AppComponentUrlCreate) (AppComponentUrl, error)

POST /apps/{appID}/components/{componentID}/urls

func (*Client) AppComponentUrlDelete

func (c *Client) AppComponentUrlDelete(appID IntID, componentID IntID, urlID IntID) error

DELETE /apps/{appID}/components/{componentID}/urls/{urlID}

func (*Client) AppComponentUrlGetList

func (c *Client) AppComponentUrlGetList(appID IntID, componentID IntID, get CommonGetParams) ([]AppComponentUrlShort, error)

GET /apps/{appID}/components/{componentID}/urls

func (*Client) AppComponentUrlGetSingle

func (c *Client) AppComponentUrlGetSingle(appID IntID, componentID IntID, urlID IntID) (AppComponentUrl, error)

GET /apps/{appID}/components/{componentID}/urls/{urlID}

func (*Client) AppComponentUrlLookup

func (c *Client) AppComponentUrlLookup(appID IntID, componentID IntID, name string) ([]AppComponentUrlShort, error)

func (*Client) AppComponentUrlUpdate

func (c *Client) AppComponentUrlUpdate(appID IntID, componentID IntID, urlID IntID, data interface{}) error

PUT /apps/{appID}/components/{componentID}/urls/{urlID}

func (*Client) AppComponentbackupsGet

func (c *Client) AppComponentbackupsGet(appID IntID, componentID IntID) ([]AppComponentAvailableBackup, error)

------------------------------------------------- APP COMPONENT BACKUP (GET) ------------------------------------------------- ---- GET LIST OF COMPONENT AVAILABLEBACKUPS

func (*Client) AppComponentsDelete

func (c *Client) AppComponentsDelete(appID IntID, componentID IntID) error

---- DELETE COMPONENT

func (*Client) AppComponentsGet

func (c *Client) AppComponentsGet(appid IntID, getParams CommonGetParams) ([]AppComponent, error)

---- GET LIST OF COMPONENTS

func (*Client) AppComponenttypesGet

func (c *Client) AppComponenttypesGet() (Appcomponenttype, error)

------------------------------------------------- APP COMPONENTS HELPERS (CATEGORY )------------------------------------------------- ---- GET LIST OFF APPCOMPONENTTYPES

func (*Client) AppCreate

func (c *Client) AppCreate(req AppPostRequest) (App, error)

---- CREATE NEW APP

func (*Client) AppDelete

func (c *Client) AppDelete(appID IntID) error

---- DELETE APP

func (*Client) AppLookup

func (c *Client) AppLookup(name string) ([]App, error)

GET appID based on name

func (*Client) AppMigrationDescribe

func (c *Client) AppMigrationDescribe(appID IntID, migrationID IntID) (AppMigration, error)

---- DESCRIBE APP MIGRATION

func (*Client) AppMigrationsAction

func (c *Client) AppMigrationsAction(appID IntID, migrationID IntID, ChosenAction string) error

------------------------------------------------- APP MIGRATIONS ACTIONS (CONFIRM / DENY / RESTART) ------------------------------------------------- ---- MIGRATIONS ACTION COMMAND

func (*Client) AppMigrationsCreate

func (c *Client) AppMigrationsCreate(appID IntID, req AppMigrationRequest) (AppMigration, error)

---- CREATE APP MIGRATION

func (*Client) AppMigrationsGet

func (c *Client) AppMigrationsGet(appID IntID) ([]AppMigration, error)

------------------------------------------------- APP MIGRATIONS (GET / DESCRIBE / CREATE / UPDATE) ------------------------------------------------- ---- GET LIST OF MIGRATIONS

func (*Client) AppMigrationsUpdate

func (c *Client) AppMigrationsUpdate(appID IntID, migrationID IntID, req interface{}) error

---- UPDATE APP MIGRATION

func (*Client) AppSslCertificatesActions

func (c *Client) AppSslCertificatesActions(appID IntID, sslCertificateID IntID, actionType string) error

POST /apps/{appID}/sslcertificates/{sslCertificateID}/actions

func (*Client) AppSslCertificatesCreate

func (c *Client) AppSslCertificatesCreate(appID IntID, create AppSslCertificateCreate) (AppSslCertificate, error)

POST /apps/{appID}/sslcertificates

func (*Client) AppSslCertificatesCreateOwn

func (c *Client) AppSslCertificatesCreateOwn(appID IntID, create AppSslCertificateCreateOwn) (AppSslCertificate, error)

POST /apps/{appID}/sslcertificates (variant for sslType == "own")

func (*Client) AppSslCertificatesDelete

func (c *Client) AppSslCertificatesDelete(appID IntID, sslCertificateID IntID) error

DELETE /apps/{appID}/sslcertificates/{sslCertificateID}

func (*Client) AppSslCertificatesFix

func (c *Client) AppSslCertificatesFix(appID IntID, sslCertificateID IntID) (AppSslCertificate, error)

POST /apps/{appID}/sslcertificates/{sslCertificateID}/fix

func (*Client) AppSslCertificatesGetList

func (c *Client) AppSslCertificatesGetList(appID IntID, sslType string, status string, get CommonGetParams) ([]AppSslCertificate, error)

GET /apps/{appID}/sslcertificates

func (*Client) AppSslCertificatesGetSingle

func (c *Client) AppSslCertificatesGetSingle(appID IntID, sslCertificateID IntID) (AppSslCertificate, error)

GET /apps/{appID}/sslcertificates/{sslCertificateID}

func (*Client) AppSslCertificatesKey

func (c *Client) AppSslCertificatesKey(appID IntID, sslCertificateID IntID) (AppSslcertificateKey, error)

GET /apps/{appID}/sslcertificates/{sslCertificateID}/key

func (*Client) AppSslCertificatesLookup

func (c *Client) AppSslCertificatesLookup(appID IntID, name string) ([]AppSslCertificate, error)

Try to find an SSL certificate on an app by name.

func (*Client) AppSslCertificatesUpdate

func (c *Client) AppSslCertificatesUpdate(appID IntID, sslCertificateID IntID, data map[string]interface{}) error

PUT /apps/{appID}/sslcertificates/{sslCertificateID}

func (*Client) AppUpdate

func (c *Client) AppUpdate(appID IntID, req AppPutRequest) error

---- UPDATE APP

func (*Client) Apps

func (c *Client) Apps(getParams CommonGetParams) ([]App, error)

Gets a list of apps from the API

func (*Client) AttachmentGetList added in v0.1.15

func (c *Client) AttachmentGetList(attachmentGet AttachmentGetParams, get CommonGetParams) ([]Attachment, error)

GET /attachments

func (*Client) AttachmentGetSingle added in v0.1.15

func (c *Client) AttachmentGetSingle(attachmentId IntID) (Attachment, error)

GET /attachments/{attachmentId}

func (*Client) AttachmentUpload added in v0.1.15

func (c *Client) AttachmentUpload(upload AttachmentUpload) (Attachment, error)

POST /attachments

func (*Client) CustPackagesGetList added in v0.1.16

func (c *Client) CustPackagesGetList() ([]CustPackageShort, error)

GET /custpackages

func (*Client) CustPackagesGetSingle added in v0.1.16

func (c *Client) CustPackagesGetSingle(name string) (CustPackage, error)

GET /custpackages/{name}

func (*Client) CustomPackageCreate added in v0.1.16

func (c *Client) CustomPackageCreate(create *CustomPackageCreate) (CustomPackage, error)

POST /custompackages

func (*Client) CustomPackageDelete added in v0.1.16

func (c *Client) CustomPackageDelete(id IntID) error

DELETE /custompackages/{id}

func (*Client) CustomPackageGetList added in v0.1.16

func (c *Client) CustomPackageGetList(get CommonGetParams) ([]CustomPackageShort, error)

GET /custompackages

func (*Client) CustomPackageGetSingle added in v0.1.16

func (c *Client) CustomPackageGetSingle(id IntID) (CustomPackage, error)

GET /custompackages/{id}

func (*Client) CustomPackageLookup added in v0.1.16

func (c *Client) CustomPackageLookup(name string) ([]CustomPackageShort, error)

func (*Client) CustomPackageRootTask added in v0.1.16

func (c *Client) CustomPackageRootTask(id IntID, request *CustomPackageRootTaskRequest) (RootTask, error)

POST /custompackages/{id}/roottasks

func (*Client) CustomPackageTemplateCreate added in v0.1.16

func (c *Client) CustomPackageTemplateCreate(packageID IntID, create *CustomPackageTemplateCreate) (CustomPackageTemplate, error)

POST /custompackages/{packageID}/templates

func (*Client) CustomPackageTemplateRemove added in v0.1.16

func (c *Client) CustomPackageTemplateRemove(packageID IntID, templateID IntID) error

DELETE /custompackages/{packageID}/templates/{templateID}

func (*Client) Domain

func (c *Client) Domain(id IntID) (Domain, error)

Gets a single domain from the API

func (*Client) DomainAccesAdd

func (c *Client) DomainAccesAdd(domainID IntID, req DomainAccessRequest) error

func (*Client) DomainAccesRemove

func (c *Client) DomainAccesRemove(domainID IntID, organisationID IntID) error

func (*Client) DomainBillableItemCreate

func (c *Client) DomainBillableItemCreate(domainid IntID, req BillPostRequest) error

--------------------------- CREATE (Turn invoicing on) CREATE BILLABLEITEM

func (*Client) DomainBillableItemDelete

func (c *Client) DomainBillableItemDelete(domainID IntID) error

---------------------------- DELETE (turn invoicing off) DELETE

func (*Client) DomainCheck

func (c *Client) DomainCheck(name string, extension string) (DomainCheckResult, error)

-------------------------------------------------------CHECK AVAILABILITY--------------------------------------------------------------------- Check domain availability

func (*Client) DomainContactCreate

func (c *Client) DomainContactCreate(request DomainContactRequest) (DomainContact, error)

POST /domaincontacts

func (*Client) DomainContactDelete

func (c *Client) DomainContactDelete(id IntID) error

DELETE /domaincontacts/{domainContactID}

func (*Client) DomainContactGetSingle

func (c *Client) DomainContactGetSingle(id IntID) (DomainContact, error)

GET /domaincontacts/{domainContactID}

func (*Client) DomainContactUpdate

func (c *Client) DomainContactUpdate(id IntID, request DomainContactRequest) error

PUT /domaincontacts/{domainContactID}

func (*Client) DomainCreate

func (c *Client) DomainCreate(req DomainRequest) (Domain, error)

CREATE DOMAIN [lvl domain create <parmeters>]

func (*Client) DomainDelete

func (c *Client) DomainDelete(id IntID) error

DELETE DOMAIN

func (*Client) DomainInternalTransfer

func (c *Client) DomainInternalTransfer(id IntID, req DomainRequest) error

INTERNAL TRANSFER

func (*Client) DomainRecord

func (c *Client) DomainRecord(domainID IntID, recordID IntID) (DomainRecord, error)

func (*Client) DomainRecordCreate

func (c *Client) DomainRecordCreate(id IntID, req DomainRecordRequest) (DomainRecord, error)

CREATE

func (*Client) DomainRecordDelete

func (c *Client) DomainRecordDelete(domainID IntID, recordID IntID) error

DELETE

func (*Client) DomainRecordUpdate

func (c *Client) DomainRecordUpdate(domainID IntID, recordID IntID, req DomainRecordRequest) error

UPDATE

func (*Client) DomainRecords

func (c *Client) DomainRecords(id IntID, recordType string, getParams CommonGetParams) ([]DomainRecord, error)

------------------ /DOMAIN/RECORDS ---------------------- GET

func (*Client) DomainTransfer

func (c *Client) DomainTransfer(req DomainRequest) (Domain, error)

TRANSFER DOMAIN [lvl domain transfer <parameters>]

func (*Client) DomainUpdate

func (c *Client) DomainUpdate(id IntID, data map[string]interface{}) error

UPDATE DOMAIN [lvl update <parameters>]

func (*Client) DomainUpdatePut

func (c *Client) DomainUpdatePut(id IntID, data DomainRequest) error

PUT /domains/{domainID}

func (*Client) Domains

func (c *Client) Domains(getParams CommonGetParams) ([]Domain, error)

Domain gets a domain from the API

func (*Client) EntityAddAcl

func (c *Client) EntityAddAcl(entityType string, entityID IntID, add AclAdd) (Acl, error)

POST /{entityType}/{entityID}/acls

func (*Client) EntityBillableItemCreate

func (c *Client) EntityBillableItemCreate(entityType string, entityID IntID, req BillPostRequest) (BillableItem, error)

POST /{entityType}/{systemID}/bill

func (*Client) EntityBillableItemDelete

func (c *Client) EntityBillableItemDelete(entityType string, entityID IntID) error

DELETE /{entityType}/{systemID}/billableitem

func (*Client) EntityGetOrganisations

func (c *Client) EntityGetOrganisations(entityType string, entityID IntID) ([]OrganisationAccess, error)

GET /{entityType}/{entityID}/organisations

func (*Client) EntityIntegrityCheck

func (c *Client) EntityIntegrityCheck(entityType string, entityID IntID, checkID IntID) (IntegrityCheck, error)

GET /{entityType}/{entityID}/integritychecks/{checkID}

func (*Client) EntityIntegrityCheckDownload

func (c *Client) EntityIntegrityCheckDownload(entityType string, entityID IntID, checkID IntID, fileName string) error

Download entity integrity check report to file.

func (*Client) EntityIntegrityChecks

func (c *Client) EntityIntegrityChecks(entityType string, entityID IntID, getParams CommonGetParams) ([]IntegrityCheck, error)

GET /{entityType}/{entityID}/integritychecks

func (*Client) EntityIntegrityCreate

func (c *Client) EntityIntegrityCreate(entityType string, entityID IntID, runJobs bool, forceRunJobs bool) (IntegrityCheck, error)

POST /{entityType}/{entityID}/integritychecks

func (*Client) EntityJobHistoryGet

func (c *Client) EntityJobHistoryGet(entityType string, entityID IntID, params PageableParams) ([]HistoryRootJob, error)

GET /jobs/history/{type}/{id}

func (*Client) EntityRemoveAcl

func (c *Client) EntityRemoveAcl(entityType string, entityID IntID, organisationID IntID) error

DELETE /{entityType}/{entityID}/acls/{organisationID}

func (*Client) Extension

func (c *Client) Extension() ([]DomainProvider, error)

gets extensions for domains

func (*Client) GetNetwork

func (c *Client) GetNetwork(id IntID) (Network, error)

func (*Client) GetNetworks

func (c *Client) GetNetworks(get CommonGetParams) ([]Network, error)

func (*Client) GetRegionImages

func (c *Client) GetRegionImages(region IntID) ([]Image, error)

func (*Client) GetRegions

func (c *Client) GetRegions() ([]Region, error)

func (*Client) GetSystemHasNetwork

func (c *Client) GetSystemHasNetwork(systemID IntID, systemHasNetworkID IntID) (SystemHasNetwork, error)

func (*Client) GetSystemProviderConfigurations

func (c *Client) GetSystemProviderConfigurations() ([]SystemProviderConfiguration, error)

func (*Client) GetSystemProviders

func (c *Client) GetSystemProviders() ([]SystemProvider, error)

------------------ GET PROVIDERS

func (*Client) GetZones

func (c *Client) GetZones(region IntID) ([]Zone, error)

func (*Client) JobDelete added in v0.1.2

func (c *Client) JobDelete(rootJobID IntID) error

DELETE /jobs/{jobId}

func (*Client) JobHistoryRootGet

func (c *Client) JobHistoryRootGet(rootJobID IntID, params JobHistoryGetParams) (Job, error)

GET /jobs/history/root/{rootJobId}

func (*Client) JobRetry added in v0.1.1

func (c *Client) JobRetry(rootJobID IntID) error

GET [sic] /jobs/{jobId}/retry

func (*Client) Login

func (c *Client) Login(username string, password string) (Login, error)

POST /login

func (*Client) Login2FA added in v0.1.13

func (c *Client) Login2FA(request *LoginRequest) (Login, error)

Alternative to Login() that accepts full requests data, for 2FA etc.

func (*Client) LoginInfo

func (c *Client) LoginInfo() (Login, error)

POST /login Fetches login information for the current API key.

func (*Client) LookupDomain

func (c *Client) LookupDomain(name string) ([]Domain, error)

func (*Client) LookupNetwork

func (c *Client) LookupNetwork(name string) ([]Network, error)

func (*Client) LookupOrganisation

func (c *Client) LookupOrganisation(name string) ([]Organisation, error)

func (*Client) LookupOrganisationUser added in v0.1.8

func (c *Client) LookupOrganisationUser(organisationID IntID, name string) ([]OrganisationUser, error)

func (*Client) LookupRegion

func (c *Client) LookupRegion(name string) (*Region, error)

Try to get a region by name

func (*Client) LookupSystem

func (c *Client) LookupSystem(name string) ([]System, error)

--------------------------- @PJ please fill in comments about code ------------------------------------ #region @PJ please fill in comments about code

func (*Client) LookupSystemHasNetworkIp

func (c *Client) LookupSystemHasNetworkIp(systemID IntID, hasNetworkID IntID, address string) ([]SystemHasNetworkIp, error)

func (*Client) LookupSystemHasNetworks

func (c *Client) LookupSystemHasNetworks(systemID IntID, name string) ([]SystemHasNetwork, error)

func (*Client) LookupSystemNonAddedSshkey

func (c *Client) LookupSystemNonAddedSshkey(systemID IntID, organisationID IntID, userID IntID, name string) (*SshKey, error)

func (*Client) LookupSystemSshkey

func (c *Client) LookupSystemSshkey(systemID IntID, name string) (*SystemSshkey, error)

func (*Client) LookupSystemVolumes

func (c *Client) LookupSystemVolumes(systemID IntID, volumeName string) (*SystemVolume, error)

func (*Client) LookupVolumegroupVolumes

func (c *Client) LookupVolumegroupVolumes(volumeGroupID IntID, name string) ([]Volume, error)

func (*Client) LookupZoneAndRegion

func (c *Client) LookupZoneAndRegion(zoneName string) (*Zone, *Region, error)

Try to get a zone by name. Very slow.

func (*Client) MailgroupsAction

func (c *Client) MailgroupsAction(mailgroupID IntID, action string) (Mailgroup, error)

POST /mailgroups/{mailgroupID}/actions

func (*Client) MailgroupsCreate

func (c *Client) MailgroupsCreate(create MailgroupCreate) (Mailgroup, error)

POST /mailgroups

func (*Client) MailgroupsDelete

func (c *Client) MailgroupsDelete(mailgroupID IntID) error

DELETE /mailgroups/{mailgroupID}

func (*Client) MailgroupsDomainAction added in v0.1.13

func (c *Client) MailgroupsDomainAction(mailgroupID IntID, domainID IntID, action string) (Mailgroup, error)

POST /mailgroups/{mailgroupID}/domains/{domainID}/actions

func (c *Client) MailgroupsDomainsLink(mailgroupID IntID, data MailgroupDomainAdd) (Mailgroup, error)

POST /mailgroups/{mailgroupID}/domains

func (*Client) MailgroupsDomainsPatch

func (c *Client) MailgroupsDomainsPatch(mailgroupID IntID, domainID IntID, data map[string]interface{}) error

PATCH /mailgroups/{mailgroupID}/domains/{domainID}

func (*Client) MailgroupsDomainsSetPrimary

func (c *Client) MailgroupsDomainsSetPrimary(mailgroupID IntID, domainID IntID) error

PATCH /mailgroups/{mailgroupID}/domains/{domainID}/setprimary

func (c *Client) MailgroupsDomainsUnlink(mailgroupID IntID, domainID IntID) error

DELETE /mailgroups/{mailgroupID}/domains/{domainID}

func (*Client) MailgroupsGetList

func (c *Client) MailgroupsGetList(get CommonGetParams) ([]Mailgroup, error)

GET /mailgroups

func (*Client) MailgroupsGetSingle

func (c *Client) MailgroupsGetSingle(mailgroupID IntID) (Mailgroup, error)

GET /mailgroups/{mailgroupID}

func (*Client) MailgroupsLookup

func (c *Client) MailgroupsLookup(name string) ([]Mailgroup, error)

func (*Client) MailgroupsMailboxesAddressesCreate

func (c *Client) MailgroupsMailboxesAddressesCreate(mailgroupID IntID, mailboxID IntID, data MailboxAddressCreate) (MailboxAddress, error)

POST /mailgroups/{mailgroupId}/mailboxes/{mailboxId}/addresses

func (*Client) MailgroupsMailboxesAddressesDelete

func (c *Client) MailgroupsMailboxesAddressesDelete(mailgroupID IntID, mailboxID IntID, addressID IntID) error

DELETE /mailgroups/{mailgroupId}/mailboxes/{mailboxId}/addresses/{addressId}

func (*Client) MailgroupsMailboxesAddressesGetList

func (c *Client) MailgroupsMailboxesAddressesGetList(mailgroupID IntID, mailboxID IntID, get CommonGetParams) ([]MailboxAddress, error)

GET /mailgroups/{mailgroupId}/mailboxes/{mailboxId}/addresses

func (*Client) MailgroupsMailboxesAddressesGetSingle

func (c *Client) MailgroupsMailboxesAddressesGetSingle(mailgroupID IntID, mailboxID IntID, addressID IntID) (MailboxAddress, error)

GET /mailgroups/{mailgroupId}/mailboxes/{mailboxId}/addresses/{addressId}

func (*Client) MailgroupsMailboxesAddressesLookup

func (c *Client) MailgroupsMailboxesAddressesLookup(mailgroupID IntID, mailboxID IntID, address string) ([]MailboxAddress, error)

func (*Client) MailgroupsMailboxesAddressesUpdate

func (c *Client) MailgroupsMailboxesAddressesUpdate(mailgroupID IntID, mailboxID IntID, addressID IntID, data map[string]interface{}) error

PUT /mailgroups/{mailgroupId}/mailboxes/addresses/{addressId}

func (*Client) MailgroupsMailboxesCreate

func (c *Client) MailgroupsMailboxesCreate(mailgroupID IntID, data MailboxCreate) (Mailbox, error)

POST /mailgroups/{mailgroupId}/mailboxes

func (*Client) MailgroupsMailboxesDelete

func (c *Client) MailgroupsMailboxesDelete(mailgroupID IntID, mailboxID IntID) error

DELETE /mailgroups/{mailgroupId}/mailboxes/{mailboxId}

func (*Client) MailgroupsMailboxesGetList

func (c *Client) MailgroupsMailboxesGetList(mailgroupID IntID, get CommonGetParams) ([]MailboxShort, error)

GET /mailgroups/{mailgroupId}/mailboxes

func (*Client) MailgroupsMailboxesGetSingle

func (c *Client) MailgroupsMailboxesGetSingle(mailgroupID IntID, mailboxID IntID) (Mailbox, error)

GET /mailgroups/{mailgroupId}/mailboxes/{mailboxId}

func (*Client) MailgroupsMailboxesLookup

func (c *Client) MailgroupsMailboxesLookup(mailgroupID IntID, name string) ([]MailboxShort, error)

func (*Client) MailgroupsMailboxesUpdate

func (c *Client) MailgroupsMailboxesUpdate(mailgroupID IntID, mailboxID IntID, data map[string]interface{}) error

PUT /mailgroups/{mailgroupId}/mailboxes

func (*Client) MailgroupsMailforwardersCreate

func (c *Client) MailgroupsMailforwardersCreate(mailgroupID IntID, data MailforwarderCreate) (Mailforwarder, error)

POST /mailgroups/{mailgroupId}/mailforwarders

func (*Client) MailgroupsMailforwardersDelete

func (c *Client) MailgroupsMailforwardersDelete(mailgroupID IntID, mailforwarderID IntID) error

DELETE /mailgroups/{mailgroupId}/mailforwarders/{mailforwarderId}

func (*Client) MailgroupsMailforwardersGetList

func (c *Client) MailgroupsMailforwardersGetList(mailgroupID IntID, get CommonGetParams) ([]Mailforwarder, error)

GET /mailgroups/{mailgroupId}/mailforwarders

func (*Client) MailgroupsMailforwardersGetSingle

func (c *Client) MailgroupsMailforwardersGetSingle(mailgroupID IntID, mailforwarderID IntID) (Mailforwarder, error)

GET /mailgroups/{mailgroupId}/mailforwarders/{mailforwarderId}

func (*Client) MailgroupsMailforwardersLookup

func (c *Client) MailgroupsMailforwardersLookup(mailgroupID IntID, name string) ([]Mailforwarder, error)

func (*Client) MailgroupsMailforwardersUpdate

func (c *Client) MailgroupsMailforwardersUpdate(mailgroupID IntID, mailforwarderID IntID, data map[string]interface{}) error

PUT /mailgroups/{mailgroupId}/mailforwarders

func (*Client) MailgroupsUpdate

func (c *Client) MailgroupsUpdate(mailgroupID IntID, data map[string]interface{}) error

PUT /mailgroups/{mailgroupID}

func (*Client) NetworkLocate

func (c *Client) NetworkLocate(networkID IntID) (NetworkLocate, error)

func (*Client) NetworkUpdate added in v0.1.8

func (c *Client) NetworkUpdate(networkID IntID, data NetworkPutRequest) error

PUT /networks/{id}

func (*Client) Organisation

func (c *Client) Organisation(organisationID IntID) (Organisation, error)

Get a single organisation from the API.

func (*Client) OrganisationCreate

func (c *Client) OrganisationCreate(req OrganisationCreate) (Organisation, error)

POST /organisations

func (*Client) OrganisationDelete

func (c *Client) OrganisationDelete(organisationID IntID) error

DELETE /organisations/{organisationID}

func (*Client) OrganisationTeamEntityAdd added in v0.1.8

func (c *Client) OrganisationTeamEntityAdd(organisationID IntID, teamID IntID, entityType string, entityID IntID) (TeamEntity, error)

POST /organisations/{organisationID}/teams/{teamID}/{entityType}

func (*Client) OrganisationTeamEntityRemove added in v0.1.8

func (c *Client) OrganisationTeamEntityRemove(organisationID IntID, teamID IntID, entityType string, entityID IntID) error

DELETE /organisations/{organisationID}/teams/{teamID}/{entityType}/{entityID}

func (*Client) OrganisationTeamGetList added in v0.1.8

func (c *Client) OrganisationTeamGetList(organisationID IntID, params CommonGetParams) ([]Team, error)

func (*Client) OrganisationTeamGetSingle added in v0.1.8

func (c *Client) OrganisationTeamGetSingle(organisationID IntID, teamID IntID) (Team, error)

func (*Client) OrganisationTeamLookup added in v0.1.8

func (c *Client) OrganisationTeamLookup(organisationID IntID, name string) ([]Team, error)

func (*Client) OrganisationUpdate

func (c *Client) OrganisationUpdate(organisationID IntID, req map[string]interface{}) error

PATCH /organisations/{organisationID}

func (*Client) OrganisationUserGetList added in v0.1.8

func (c *Client) OrganisationUserGetList(organisationID IntID, params CommonGetParams) ([]OrganisationUser, error)

GET /organisations/{organisationID}/users

func (Client) OrganisationUserGetSingle

func (c Client) OrganisationUserGetSingle(organisationID IntID, userID IntID) (User, error)

GET /organisations/{organisationID}/users/{userID}

func (Client) OrganisationUserGetSshKeys

func (c Client) OrganisationUserGetSshKeys(organisationID IntID, userID IntID, get CommonGetParams) ([]SshKey, error)

GET /organisations/{organisationID}/users/{userID}/sshkeys

func (*Client) OrganisationUserSshKeysCreate added in v0.1.8

func (c *Client) OrganisationUserSshKeysCreate(organisationID IntID, userID IntID, data SshKeyCreate) (SshKey, error)

POST /organisations/{organisationID}/users/{userID}/sshkeys

func (*Client) OrganisationUserSshKeysGetSingle

func (c *Client) OrganisationUserSshKeysGetSingle(organisationID IntID, userID IntID, sshKeyID IntID) (SshKey, error)

GET /organisations/{organisationID}/users/{userID}/sshkeys/{sshKeyID}

func (*Client) OrganisationUserSshKeysLookup

func (c *Client) OrganisationUserSshKeysLookup(organisationID IntID, userID IntID, name string) ([]SshKey, error)

Find all SSH keys on a user matching the specified description.

func (*Client) Organisations

func (c *Client) Organisations(getParams CommonGetParams) ([]Organisation, error)

Organisation gets a organisation from the API

func (*Client) RootTaskCreate added in v0.1.16

func (c *Client) RootTaskCreate(create RootTaskCreate) (RootTask, error)

POST /roottasks

func (*Client) RootTaskGetSingle added in v0.1.16

func (c *Client) RootTaskGetSingle(id IntID) (RootTask, error)

GET /roottasks/{id}

func (*Client) SecurityUpdateDates

func (c *Client) SecurityUpdateDates() ([]string, error)

func (*Client) SystemAction

func (c *Client) SystemAction(id IntID, action string) (System, error)

func (*Client) SystemActionStartMaintenance added in v0.1.17

func (c *Client) SystemActionStartMaintenance(systemId IntID, stopMaintenance int32) (System, error)

POST /systems/{systemId}/actions for startMaintenance

func (*Client) SystemAddHasNetwork

func (c *Client) SystemAddHasNetwork(systemID IntID, networkID IntID) (SystemHasNetwork, error)

func (*Client) SystemAddHasNetworkIps

func (c *Client) SystemAddHasNetworkIps(systemID IntID, hasNetworkID IntID, add SystemHasNetworkIpAdd) (SystemHasNetworkIp, error)

func (*Client) SystemAddSshKey

func (c *Client) SystemAddSshKey(id IntID, keyID IntID) (SystemSshkey, error)

func (*Client) SystemCheckAdd

func (c *Client) SystemCheckAdd(systemID IntID, req interface{}) (SystemCheck, error)

------------- ADD A CHECK

func (*Client) SystemCheckDelete

func (c *Client) SystemCheckDelete(systemID IntID, checkID IntID) error

---------------- DELETE A SPECIFIC CHECK

func (*Client) SystemCheckDescribe

func (c *Client) SystemCheckDescribe(systemID IntID, CheckID IntID) (SystemCheck, error)

#region SYSTEM/CHECKS SPECIFIC (DESCRIBE / DELETE / UPDATE) ---------------- DESCRIBE A SPECIFIC CHECK

func (*Client) SystemCheckGetList

func (c *Client) SystemCheckGetList(systemID IntID, getParams CommonGetParams) ([]SystemCheckGet, error)

--------------------------- SYSTEM/CHECKS TOPLEVEL (GET / POST ) ------------------------------------ #region SYSTEM/CHECKS TOPLEVEL (GET / ADD) ------------- GET CHECKS

func (*Client) SystemCheckLookup added in v0.1.12

func (c *Client) SystemCheckLookup(systemID IntID, checkType string) ([]SystemCheckGet, error)

func (*Client) SystemCheckTypeGet

func (c *Client) SystemCheckTypeGet(checktype string) (SystemCheckType, error)

---------------- GET CHECK PARAMETERS (for specific checktype)

func (*Client) SystemCheckUpdate

func (c *Client) SystemCheckUpdate(systemID IntID, checkID IntID, req interface{}) error

---------------- UPDATE A SPECIFIC CHECK

func (*Client) SystemCookbookAdd

func (c *Client) SystemCookbookAdd(systemID IntID, req *CookbookRequest) (Cookbook, error)

---------------- ADD COOKBOOK

func (*Client) SystemCookbookChangesApply

func (c *Client) SystemCookbookChangesApply(systemID IntID) error

--------------------------- APPLY COOKBOOKCHANGES ON A SYSTEM

func (*Client) SystemCookbookDelete

func (c *Client) SystemCookbookDelete(systemID IntID, cookbookID IntID) error

---------------- DELETE

func (*Client) SystemCookbookDescribe

func (c *Client) SystemCookbookDescribe(systemID IntID, cookbookID IntID) (Cookbook, error)

---------------- DESCRIBE

func (*Client) SystemCookbookGetList

func (c *Client) SystemCookbookGetList(systemID IntID, get CommonGetParams) ([]Cookbook, error)

---------------- GET COOKBOOK

func (*Client) SystemCookbookLookup

func (c *Client) SystemCookbookLookup(systemID IntID, cookbookType string) (*Cookbook, error)

Look up a cookbook of a specified type up on a system. Returns nil if the system does not have a cookbook of the given type.

func (*Client) SystemCookbookTypeGet

func (c *Client) SystemCookbookTypeGet(cookbooktype string) (CookbookType, *gabs.Container, error)

--------------------------- SYSTEM/COOKBOOKS PARAMETERS (GET) ------------------------------------ #region SYSTEM/COOKBOOKS PARAMETERS (GET) ---------------- GET COOKBOOKTYPES parameters

func (*Client) SystemCookbookUpdate

func (c *Client) SystemCookbookUpdate(systemID IntID, cookbookID IntID, req *CookbookRequest) error

------------------ UPDATE

func (*Client) SystemCreate

func (c *Client) SystemCreate(req SystemPost) (System, error)

CREATE SYSTEM [lvl system create <parmeters>]

func (*Client) SystemDelete

func (c *Client) SystemDelete(id IntID) error

---------------- Delete

func (*Client) SystemDeleteForce

func (c *Client) SystemDeleteForce(id IntID) error

func (*Client) SystemGetHasNetworkIp

func (c *Client) SystemGetHasNetworkIp(systemID IntID, hasNetworkID IntID, systemHasNetworkIpID IntID) (SystemHasNetworkIp, error)

func (*Client) SystemGetHasNetworkIps

func (c *Client) SystemGetHasNetworkIps(systemID IntID, hasNetworkID IntID) ([]SystemHasNetworkIp, error)

func (*Client) SystemGetHasNetworks

func (c *Client) SystemGetHasNetworks(id IntID) ([]SystemHasNetwork, error)

func (*Client) SystemGetList

func (c *Client) SystemGetList(getParams CommonGetParams) ([]System, error)

--------------------------- TOPLEVEL SYSTEM ACTIONS (GET / POST) ------------------------------------ #region SYSTEM TOPLEVEL (GET / CREATE) ------------------ GET returning a list of all current systems [lvl system get]

func (*Client) SystemGetNonAddedSshKeys

func (c *Client) SystemGetNonAddedSshKeys(systemID IntID, organisationID IntID, userID IntID, get CommonGetParams) ([]SshKey, error)

func (*Client) SystemGetSingle

func (c *Client) SystemGetSingle(id IntID) (System, error)

Returning a single system by its ID this is not for a describe.

func (*Client) SystemGetSshKeys

func (c *Client) SystemGetSshKeys(id IntID, get CommonGetParams) ([]SystemSshkey, error)

func (*Client) SystemGetVolumes

func (c *Client) SystemGetVolumes(id IntID, get CommonGetParams) ([]SystemVolume, error)

func (*Client) SystemHasNetworkIpUpdate

func (c *Client) SystemHasNetworkIpUpdate(systemID IntID, hasNetworkID IntID, hasNetworkIpID IntID, data map[string]interface{}) error

func (*Client) SystemRemoveHasNetwork

func (c *Client) SystemRemoveHasNetwork(systemID IntID, hasNetworkID IntID) error

func (*Client) SystemRemoveHasNetworkIps

func (c *Client) SystemRemoveHasNetworkIps(systemID IntID, hasNetworkID IntID, ipID IntID) error

func (*Client) SystemRemoveSshKey

func (c *Client) SystemRemoveSshKey(id IntID, keyID IntID) error

func (*Client) SystemSettingsGetList added in v0.1.1

func (c *Client) SystemSettingsGetList(systemID IntID, get CommonGetParams) ([]Cookbook, error)

func (*Client) SystemSettingsLookup added in v0.1.1

func (c *Client) SystemSettingsLookup(systemID IntID, cookbookType string) (*Cookbook, error)

func (*Client) SystemSshKeysGetSingle

func (c *Client) SystemSshKeysGetSingle(systemID IntID, sshKeyID IntID) (SystemSshkey, error)

GET /systems/{systemID}/sshkeys/{sshKeyID}

func (*Client) SystemSystemgroupsAdd

func (c *Client) SystemSystemgroupsAdd(systemID IntID, req interface{}) error

---------------- LINK SYSTEM TO A SYSTEMGROUP

func (*Client) SystemSystemgroupsGet

func (c *Client) SystemSystemgroupsGet(systemID IntID) ([]Systemgroup, error)

---------------- GET GROUPS

func (*Client) SystemSystemgroupsRemove

func (c *Client) SystemSystemgroupsRemove(systemID IntID, systemgroupID IntID) error

---------------- UNLINK A SYSTEM FROM SYSTEMGROUP

func (*Client) SystemUpdate

func (c *Client) SystemUpdate(id IntID, data map[string]interface{}) error

func (*Client) SystemgroupDelete

func (c *Client) SystemgroupDelete(systemgroupID IntID) error

---------------- DELETE

func (*Client) SystemgroupLookup

func (c *Client) SystemgroupLookup(name string) ([]Systemgroup, error)

func (*Client) SystemgroupsCreate

func (c *Client) SystemgroupsCreate(req SystemgroupRequest) (Systemgroup, error)

---------------- CREATE

func (*Client) SystemgroupsGet

func (c *Client) SystemgroupsGet(optParameters CommonGetParams) ([]Systemgroup, error)

---------------- GET

func (*Client) SystemgroupsUpdate

func (c *Client) SystemgroupsUpdate(systemgroupID IntID, req SystemgroupRequest) error

---------------- UPDATE

func (*Client) SystemgroupsgetSingle

func (c *Client) SystemgroupsgetSingle(systemgroupID IntID) (Systemgroup, error)

---------------- GET SINGLE (describe)

func (*Client) TemplatesGetList added in v0.1.14

func (c *Client) TemplatesGetList(customPackagePossible bool) ([]TemplateShort, error)

func (*Client) TemplatesGetSingle added in v0.1.14

func (c *Client) TemplatesGetSingle(name string, params TemplateGetSingleRequest) (Template, error)

func (*Client) TraceRequests

func (c *Client) TraceRequests(tracer RequestTracer)

func (*Client) VolumeCreate

func (c *Client) VolumeCreate(create VolumeCreate) (Volume, error)

POST /volume

func (*Client) VolumeDelete

func (c *Client) VolumeDelete(volumeID IntID) error

DELETE /volume/{volumeID}

func (*Client) VolumeGetList

func (c *Client) VolumeGetList(get CommonGetParams) ([]Volume, error)

GET /volume

func (*Client) VolumeGetSingle

func (c *Client) VolumeGetSingle(volumeID IntID) (Volume, error)

GET /volume/{volumeID}

func (c *Client) VolumeLink(volumeID IntID, systemID IntID, deviceName string) (Volume, error)

POST /volume/{volumeID}/actions (link)

func (c *Client) VolumeUnlink(volumeID IntID, systemID IntID) (Volume, error)

POST /volume/{volumeID}/actions (unlink)

func (*Client) VolumeUpdate

func (c *Client) VolumeUpdate(volumeID IntID, data map[string]interface{}) error

PUT /volume/{volumeID}

func (*Client) VolumegroupVolumeGetList

func (c *Client) VolumegroupVolumeGetList(volumegroupID IntID, get CommonGetParams) ([]Volume, error)

GET /volumegroups/{volumegroupID}/volumes

type CommonGetParams

type CommonGetParams struct {
	OrderBy   string
	OrderType string
	Filter    string
	PageableParams
}

Common parameters related to filtering and such that are common to all get-like operations.

type Contact

type Contact struct {
	ID        IntID     `json:"id"`
	DtStamp   string    `json:"dtStamp"`
	FullName  string    `json:"fullName"`
	Language  string    `json:"language"`
	Message   string    `json:"message"`
	Status    IntStatus `json:"status"`
	Type      string    `json:"type"`
	Value     string    `json:"value"`
	ContactID IntID     `json:"contactId"`
}

type Cookbook

type Cookbook struct {
	ID                             IntID                               `json:"id"`
	CookbookType                   string                              `json:"cookbooktype"`
	CookbookParameters             BuggyMap[string, CookbookParameter] `json:"cookbookparameters"`
	CookbookParametersDescriptions BuggyMap[string, string]            `json:"cookbookparameterDescriptions"`
	PreviousCookbookParameters     interface{}                         `json:"previousCookbookparameters"`
	Status                         string                              `json:"status"`
	StatusCategory                 string                              `json:"statusCategory"`
	System                         SystemRef                           `json:"system"`
}

----------------------------------- COOKBOOKS ---------------------------------- --- COOKBOOK

type CookbookParameter

type CookbookParameter struct {
	Value   interface{} `json:"value"`
	Default bool        `json:"default"`
}

type CookbookParameterOption

type CookbookParameterOption struct {
	Name                    string      `json:"name"`
	Exclusive               bool        `json:"exclusive"`
	Value                   interface{} `json:"value"`
	OperatingSystemVersions []struct {
		Name    string `json:"name"`
		Default bool   `json:"default"`
	} `json:"operatingsystem_versions"`
}

parameteroptionsData

type CookbookParameterOptionName

type CookbookParameterOptionName map[string]CookbookParameterOptionValue

parameteroptionCategory

type CookbookParameterOptionValue

type CookbookParameterOptionValue map[string]CookbookParameterOption

parameterOptionValue

type CookbookRequest

type CookbookRequest struct {
	Cookbooktype       string
	Cookbookparameters map[string]interface{}
}

func (*CookbookRequest) MarshalJSON

func (r *CookbookRequest) MarshalJSON() ([]byte, error)

type CookbookType

type CookbookType struct {
	CookbookType struct {
		Name        string `json:"name"`
		DisplayName string `json:"displayName"`
		Description string `json:"description"`
		Parameters  []struct {
			Name         string      `json:"name"`
			Description  string      `json:"description"`
			Type         string      `json:"type"`
			DefaultValue interface{} `json:"defaultValue"`
		} `json:"parameters"`
		ParameterOptions CookbookParameterOptionName `json:"parameterOptions"`
	} `json:"cookbooktype"`
}

type CookbookTypeName

type CookbookTypeName map[string]CookbookType

Cookbooktype (used to see all current valid cookbooktypes)

type CustPackage added in v0.1.16

type CustPackage struct {
	Name        string          `json:"name"`
	DisplayName LocalizedString `json:"displayName"`
	Description LocalizedString `json:"description"`
	Entity      string          `json:"entity"`
	Type        string          `json:"type"`
	Destination string          `json:"destination"`
	Roles       []string        `json:"roles"`
	// Currently untyped in API.
	Labels interface{} `json:"labels"`
	// Currently untyped in API.
	Content    interface{}                    `json:"content"`
	Parameters map[string]CustPackageTemplate `json:"parameters"`
	Templates  []struct {
		Name        string          `json:"name"`
		DisplayName LocalizedString `json:"displayName"`
		Type        string          `json:"type"`
		Ord         int32           `json:"ord"`
		LimitGroup  *string         `json:"limitGroup"`
	} `json:"templates"`
	AllowedUpgradesDowngrades []string                        `json:"allowedUpgradesDowngrades"`
	Components                map[string]CustPackageComponent `json:"components"`
	ExtraTemplates            []struct {
		Max                 interface{} `json:"max"`
		Template            string      `json:"template"`
		TemplateDescription string      `json:"templateDescription"`
		AllowedTemplates    interface{} `json:"allowedTemplates,omitempty"`
	} `json:"extra_templates"`
	Products []struct {
		ID                  string      `json:"id"`
		Description         string      `json:"description"`
		QuantityCalculation interface{} `json:"quantityCalculation"`
		ProductPrice        struct {
			ID       IntID  `json:"id"`
			Period   int32  `json:"period"`
			Currency string `json:"currency"`
			Price    string `json:"price"`
			Timing   string `json:"timing"`
		} `json:"productPrice"`
	} `json:"products"`
}

func (*CustPackage) ToShort added in v0.1.16

func (pack *CustPackage) ToShort() CustPackageShort

type CustPackageComponent added in v0.1.16

type CustPackageComponent struct {
	Type                string `json:"type"`
	Description         string `json:"description"`
	SharedResource      bool   `json:"sharedResource"`
	Max                 int32  `json:"max"`
	UniqueComponentType bool   `json:"uniqueComponentType"`
	RuleIdentifier      string `json:"ruleIdentifier"`
	Resources           []struct {
		Type        string  `json:"type"`
		DisplayType string  `json:"displayType"`
		Description string  `json:"description"`
		Unit        string  `json:"unit"`
		Value       float64 `json:"value"`
	} `json:"resources"`
	AllowedTemplates []struct {
		ComponentType       string `json:"componentType"`
		Template            string `json:"template"`
		TemplateDescription string `json:"templateDescription"`
	} `json:"allowedTemplates"`
	AllowedUpgrades []struct {
		Name        string  `json:"name"`
		Type        string  `json:"type"`
		Description string  `json:"description"`
		Value       float64 `json:"value"`
		Unit        string  `json:"unit"`
		AddToMax    bool    `json:"addToMax,omitempty"`
	} `json:"allowedUpgrades"`
}

type CustPackageShort added in v0.1.16

type CustPackageShort struct {
	Name        string          `json:"name"`
	DisplayName LocalizedString `json:"displayName"`
	Description LocalizedString `json:"description"`
	// Field appears bugged in API right now.
	//Type        LocalizedString `json:"type"`
	// Currently untyped in API.
	Labels interface{} `json:"labels"`
}

type CustPackageTemplate added in v0.1.16

type CustPackageTemplate struct {
	DisplayName        LocalizedString `json:"displayName"`
	Type               string          `json:"type"`
	Required           bool            `json:"required"`
	Default            interface{}     `json:"default"`
	ReadOnly           bool            `json:"readOnly"`
	RequiredByRootTask bool            `json:"requiredByRootTask"`
}

type CustomPackage added in v0.1.14

type CustomPackage struct {
	ID                     IntID                             `json:"id"`
	Name                   string                            `json:"name"`
	CustomPackageName      string                            `json:"customPackageName"`
	Type                   string                            `json:"type"`
	Status                 string                            `json:"status"`
	Params                 map[string]CustomPackageParameter `json:"params"`
	Definition             CustPackage                       `json:"definition"`
	Limits                 map[string]CustomPackageLimit     `json:"limits"`
	Upgrades               []interface{}                     `json:"upgrades"`
	CustomPackageTemplates []CustomPackageTemplate           `json:"customPackageTemplates"`
	Organisation           OrganisationRef                   `json:"organisation"`
	StatusCategory         string                            `json:"statusCategory"`
	Teams                  []interface{}                     `json:"teams"`
	CountTeams             int32                             `json:"countTeams"`
}

func (CustomPackage) ToShort added in v0.1.14

func (pack CustomPackage) ToShort() CustomPackageShort

type CustomPackageCreate added in v0.1.16

type CustomPackageCreate struct {
	Name              string `json:"name"`
	CustomPackageName string `json:"customPackageName"`
	AutoUpgrades      string `json:"autoUpgrades"`
	AutoTeams         string `json:"autoTeams"`
	Organisation      IntID  `json:"organisation"`
}

type CustomPackageLimit added in v0.1.16

type CustomPackageLimit struct {
	Max                 int                                 `json:"max"`
	Type                string                              `json:"type"`
	Resources           []CustomPackageLimitResource        `json:"resources"`
	Description         string                              `json:"description"`
	RuleIdentifier      string                              `json:"ruleIdentifier"`
	SharedResource      bool                                `json:"sharedResource"`
	AllowedUpgrades     []CustomPackageLimitAllowedUpgrade  `json:"allowedUpgrades"`
	AllowedTemplates    []CustomPackageLimitAllowedTemplate `json:"allowedTemplates"`
	UniqueComponentType bool                                `json:"uniqueComponentType"`
}

type CustomPackageLimitAllowedTemplate added in v0.1.16

type CustomPackageLimitAllowedTemplate struct {
	Template            string `json:"template"`
	ComponentType       string `json:"componentType"`
	TemplateDescription string `json:"templateDescription"`
}

type CustomPackageLimitAllowedUpgrade added in v0.1.16

type CustomPackageLimitAllowedUpgrade struct {
	Name        string  `json:"name"`
	Type        string  `json:"type"`
	Unit        string  `json:"unit"`
	Value       float64 `json:"value"`
	Description string  `json:"description"`
	AddToMax    bool    `json:"addToMax,omitempty"`
}

type CustomPackageLimitResource added in v0.1.16

type CustomPackageLimitResource struct {
	Type        string  `json:"type"`
	Unit        string  `json:"unit"`
	Value       float64 `json:"value"`
	Description string  `json:"description"`
	DisplayType string  `json:"displayType"`
}

type CustomPackageParameter added in v0.1.16

type CustomPackageParameter struct {
	Type               string          `json:"type"`
	Default            interface{}     `json:"default"`
	ReadOnly           bool            `json:"readOnly"`
	Required           bool            `json:"required"`
	DisplayName        LocalizedString `json:"displayName"`
	RequiredByRootTask bool            `json:"requiredByRootTask"`
}

type CustomPackageRootTaskRequest added in v0.1.16

type CustomPackageRootTaskRequest struct {
	Organisation IntID
	Params       map[string]ParameterValue
}

func (CustomPackageRootTaskRequest) MarshalJSON added in v0.1.16

func (req CustomPackageRootTaskRequest) MarshalJSON() ([]byte, error)

type CustomPackageShort added in v0.1.14

type CustomPackageShort struct {
	ID                IntID           `json:"id"`
	Name              string          `json:"name"`
	CustomPackageName string          `json:"customPackageName"`
	Type              string          `json:"type"`
	Status            string          `json:"status"`
	Upgrades          []interface{}   `json:"upgrades"`
	Organisation      OrganisationRef `json:"organisation"`
	StatusCategory    string          `json:"statusCategory"`
}

type CustomPackageTemplate added in v0.1.14

type CustomPackageTemplate struct {
	ID             IntID         `json:"id"`
	Template       string        `json:"template"`
	Status         string        `json:"status"`
	Params         ParameterList `json:"params"`
	Definition     Template      `json:"definition,omitempty"`
	Predefined     bool          `json:"predefined"`
	Ord            int32         `json:"ord"`
	LimitGroup     interface{}   `json:"limitGroup"`
	StatusCategory string        `json:"statusCategory"`
}

type CustomPackageTemplateCreate added in v0.1.16

type CustomPackageTemplateCreate struct {
	Template      string
	LimitGroup    string
	CustomPackage IntID
	Parameters    map[string]ParameterValue
}

func (*CustomPackageTemplateCreate) MarshalJSON added in v0.1.16

func (c *CustomPackageTemplateCreate) MarshalJSON() ([]byte, error)

type Domain

type Domain struct {
	ID                    IntID  `json:"id"`
	Name                  string `json:"name"`
	Fullname              string `json:"fullname"`
	TTL                   int32  `json:"ttl"`
	EppCode               string `json:"eppCode"`
	Status                string `json:"status"`
	DnssecStatus          string `json:"dnssecStatus"`
	RegistrationIsHandled bool   `json:"registrationIsHandled"`
	Provider              struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
		API  string `json:"api"`
	} `json:"provider"`
	DNSIsHandled    bool    `json:"dnsIsHandled"`
	DtRegister      string  `json:"dtRegister"`
	Nameserver1     *string `json:"nameserver1"`
	Nameserver2     *string `json:"nameserver2"`
	Nameserver3     *string `json:"nameserver3"`
	Nameserver4     *string `json:"nameserver4"`
	NameserverIP1   *string `json:"nameserverIp1"`
	NameserverIP2   *string `json:"nameserverIp2"`
	NameserverIP3   *string `json:"nameserverIp3"`
	NameserverIP4   *string `json:"nameserverIp4"`
	NameserverIpv61 *string `json:"nameserverIpv61"`
	NameserverIpv62 *string `json:"nameserverIpv62"`
	NameserverIpv63 *string `json:"nameserverIpv63"`
	NameserverIpv64 *string `json:"nameserverIpv64"`
	Organisation    struct {
		ID       IntID  `json:"id"`
		Name     string `json:"name"`
		Reseller string `json:"reseller"`
	} `json:"organisation"`
	Domaintype struct {
		ID                                  IntID  `json:"id"`
		Name                                string `json:"name"`
		Extension                           string `json:"extension"`
		RenewPeriod                         int32  `json:"renewPeriod"`
		TransferAutoLicensee                bool   `json:"transferAutoLicensee"`
		RequestIncomingTransferCodePossible bool   `json:"requestIncomingTransferCodePossible"`
		RequestOutgoingTransferCodePossible bool   `json:"requestOutgoingTransferCodePossible"`
		LicenseeChangePossible              bool   `json:"licenseeChangePossible"`
		DnssecSupported                     bool   `json:"dnssecSupported"`
	} `json:"domaintype"`
	DomaincontactLicensee DomainContactRef  `json:"domaincontactLicensee"`
	DomaincontactOnsite   *DomainContactRef `json:"domaincontactOnsite"`
	Mailgroup             struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"mailgroup"`
	ExtraFields   interface{} `json:"extraFields"`
	HandleMailDNS bool        `json:"handleMailDns"`
	DtExpires     IntTime     `json:"dtExpires"`
	BillingStatus string      `json:"billingStatus"`
	ExternalInfo  string      `json:"externalInfo"`
	Teams         []struct {
		ID             IntID  `json:"id"`
		Name           string `json:"name"`
		AdminOnly      bool   `json:"adminOnly"`
		OrganisationID IntID  `json:"organisationId"`
	} `json:"teams"`
	CountTeams int32 `json:"countTeams"`
	Jobs       []Job `json:"jobs"`
}

type DomainAccessRequest

type DomainAccessRequest struct {
	Organisation IntID `json:"organisation"`
}

type to add acces to a domain

type DomainCheckResult

type DomainCheckResult struct {
	Success                             bool   `json:"success"`
	Status                              string `json:"status"`
	Action                              string `json:"action"`
	DomaintypeID                        IntID  `json:"domaintypeId"`
	DomainNameWithExtension             string `json:"domainNameWithExtension"`
	RequestIncomingTransferCodePossible bool   `json:"requestIncomingTransferCodePossible"`
	TransferAutoLicensee                bool   `json:"transferAutoLicensee"`
	TransferEppCodeRequired             bool   `json:"transferEppCodeRequired"`
	Products                            []struct {
		ID          string `json:"id"`
		Description string `json:"description"`
		Prices      []struct {
			ID       IntID     `json:"id"`
			Period   int32     `json:"period"`
			Currency string    `json:"currency"`
			Price    string    `json:"price"`
			Timing   string    `json:"timing"`
			Default  bool      `json:"default"`
			Status   IntStatus `json:"sttaus"`
		} `json:"prices"`
	} `json:"products"`
}

Domain check

type DomainContact

type DomainContact struct {
	ID               IntID   `json:"id"`
	FirstName        string  `json:"firstName"`
	LastName         string  `json:"lastName"`
	OrganisationName string  `json:"organisationName"`
	Street           string  `json:"street"`
	HouseNumber      string  `json:"houseNumber"`
	Zip              string  `json:"zip"`
	City             string  `json:"city"`
	State            *string `json:"state"`
	Phone            string  `json:"phone"`
	Fax              *string `json:"fax"`
	Email            string  `json:"email"`
	TaxNumber        string  `json:"taxNumber"`
	PassportNumber   *string `json:"passportNumber"`
	SocialNumber     *string `json:"socialNumber"`
	BirthStreet      *string `json:"birthStreet"`
	BirthZip         *string `json:"birthZip"`
	BirthCity        *string `json:"birthCity"`
	BirthDate        *string `json:"birthDate"`
	Gender           *string `json:"gender"`
	Type             string  `json:"type"`
	Country          struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"country"`
	Organisation struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"organisation"`
	Fullname string `json:"fullname"`
}

DomainContact is an object to define domain contacts at Level27

type DomainContactRef

type DomainContactRef struct {
	ID               IntID     `json:"id,omitempty"`
	FirstName        string    `json:"firstName"`
	LastName         string    `json:"lastName"`
	Fullname         string    `json:"fullname"`
	OrganisationName string    `json:"organisationName"`
	Street           string    `json:"street"`
	HouseNumber      string    `json:"houseNumber"`
	Zip              string    `json:"zip"`
	City             string    `json:"city"`
	State            string    `json:"state"`
	Phone            string    `json:"phone"`
	Fax              string    `json:"fax"`
	Email            string    `json:"email"`
	TaxNumber        string    `json:"taxNumber"`
	Status           IntStatus `json:"status"`
	PassportNumber   string    `json:"passportNumber"`
	SocialNumber     string    `json:"socialNumber"`
	BirthStreet      string    `json:"birthStreet"`
	BirthZip         string    `json:"birthZip"`
	BirthCity        string    `json:"birthCity"`
	BirthDate        string    `json:"birthDate"`
	Gender           string    `json:"gender"`
	Type             string    `json:"type"`
	Country          struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"country"`
}

type DomainContactRequest

type DomainContactRequest struct {
	Type             string  `json:"type"`
	FirstName        string  `json:"firstName"`
	LastName         string  `json:"lastName"`
	OrganisationName string  `json:"organisationName"`
	Street           string  `json:"street"`
	HouseNumber      string  `json:"houseNumber"`
	Zip              string  `json:"zip"`
	City             string  `json:"city"`
	State            *string `json:"state,omitempty"`
	Phone            string  `json:"phone"`
	Fax              *string `json:"fax,omitempty"`
	Email            string  `json:"email"`
	TaxNumber        string  `json:"taxNumber"`
	PassportNumber   *string `json:"passportNumber,omitempty"`
	SocialNumber     *string `json:"socialNumber,omitempty"`
	BirthStreet      *string `json:"birthStreet,omitempty"`
	BirthZip         *string `json:"birthZip,omitempty"`
	BirthCity        *string `json:"birthCity,omitempty"`
	BirthDate        *string `json:"birthDate,omitempty"`
	Gender           *string `json:"gender,omitempty"`
	Country          string  `json:"country"`
	Organisation     string  `json:"organisation"`
}

DomainContactRequest is an object to define the request to create or modify a domain contact at Level27

type DomainExtension

type DomainExtension struct {
	ID        IntID
	Extension string
}

DomainExtension represents a single DomainExtension

type DomainNotificationPostRequest

type DomainNotificationPostRequest struct {
	Type   string `json:"type"`
	Group  string `json:"group"`
	Params string `json:"params"`
}

------------------------------------------ NOTIFICATIONS ---------------------------------------------

type DomainProvider

type DomainProvider struct {
	ID              IntID  `json:"id"`
	Name            string `json:"name"`
	API             string `json:"api"`
	DNSSecSupported bool   `json:"dnsSecSupported"`
	Domaintypes     []struct {
		ID        IntID  `json:"id"`
		Extension string `json:"extension"`
	} `json:"domaintypes"`
}

DomainProvider represents a single DomainProvider

type DomainRecord

type DomainRecord struct {
	ID                 IntID  `json:"id"`
	Name               string `json:"name"`
	Content            string `json:"content"`
	Priority           int32  `json:"priority"`
	Type               string `json:"type"`
	SystemHasNetworkIP struct {
		ID IntID `json:"id"`
	} `json:"systemHasNetworkIp"`
}

DomainRecord represents a single Domainrecord

type DomainRecordRequest

type DomainRecordRequest struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Content  string `json:"content"`
	Priority int32  `json:"priority"`
}

DomainRecordRequest represents a API reqest to Level27

type DomainRequest

type DomainRequest struct {
	Name                      string  `json:"name"`
	NameServer1               *string `json:"nameserver1"`
	NameServer2               *string `json:"nameserver2"`
	NameServer3               *string `json:"nameserver3"`
	NameServer4               *string `json:"nameserver4"`
	NameServer1Ip             *string `json:"nameserverIp1"`
	NameServer2Ip             *string `json:"nameserverIp2"`
	NameServer3Ip             *string `json:"nameserverIp3"`
	NameServer4Ip             *string `json:"nameserverIp4"`
	NameServer1Ipv6           *string `json:"nameserverIpv61"`
	NameServer2Ipv6           *string `json:"nameserverIpv62"`
	NameServer3Ipv6           *string `json:"nameserverIpv63"`
	NameServer4Ipv6           *string `json:"nameserverIpv64"`
	TTL                       int32   `json:"ttl"`
	Action                    string  `json:"action"`
	EppCode                   string  `json:"eppCode"`
	Handledns                 bool    `json:"handleDns"`
	ExtraFields               string  `json:"extraFields"`
	Domaintype                IntID   `json:"domaintype"`
	Domaincontactlicensee     *IntID  `json:"domaincontactLicensee"`
	DomainContactOnSite       *IntID  `json:"domaincontactOnsite"`
	Organisation              IntID   `json:"organisation"`
	AutoRecordTemplate        string  `json:"autorecordTemplate"`
	AutoRecordTemplateReplace bool    `json:"autorecordTemplateReplace"`
	//DomainProvider            *IntID    `json:"domainProvider"`
	// DtExternalCreated         string `json:"dtExternalCreated"`
	// DtExternalExpires         string `json:"dtExternalExpires"`
	// ConvertDomainRecords      string `json:"convertDomainrecords"`
	AutoTeams    string  `json:"autoTeams"`
	ExternalInfo *string `json:"externalInfo,omitempty"`
}

DomainRequest represents a single DomainRequest

func (DomainRequest) String

func (d DomainRequest) String() string

type DomainUpdateRequest

type DomainUpdateRequest struct {
	Name                      string  `json:"name"`
	NameServer1               *string `json:"nameserver1"`
	NameServer2               string  `json:"nameserver2"`
	NameServer3               string  `json:"nameserver3"`
	NameServer4               string  `json:"nameserver4"`
	NameServer1Ip             string  `json:"nameserverIp1"`
	NameServer2Ip             string  `json:"nameserverIp2"`
	NameServer3Ip             string  `json:"nameserverIp3"`
	NameServer4Ip             string  `json:"nameserverIp4"`
	NameServer1Ipv6           string  `json:"nameserverIpv61"`
	NameServer2Ipv6           string  `json:"nameserverIpv62"`
	NameServer3Ipv6           string  `json:"nameserverIpv63"`
	NameServer4Ipv6           string  `json:"nameserverIpv64"`
	TTL                       int32   `json:"ttl"`
	Action                    string  `json:"action"`
	EppCode                   string  `json:"eppCode"`
	Handledns                 bool    `json:"handleDns"`
	ExtraFields               string  `json:"extraFields"`
	Domaintype                IntID   `json:"domaintype"`
	Domaincontactlicensee     IntID   `json:"domaincontactLicensee"`
	DomainContactOnSite       *IntID  `json:"domaincontactOnsite"`
	Organisation              IntID   `json:"organisation"`
	AutoRecordTemplate        string  `json:"autorecordTemplate"`
	AutoRecordTemplateReplace bool    `json:"autorecordTemplateReplace"`
	AutoTeams                 string  `json:"autoTeams"`
}

request for updating a single domain

type EmptyArrayDefault added in v0.1.14

type EmptyArrayDefault[T any] struct {
	Value T
}

Workaround for API definitions that define [] instead of {} for empty objects. Accepts [] and deserializes it as default value.

func (*EmptyArrayDefault[T]) MarshalJSON added in v0.1.14

func (b *EmptyArrayDefault[T]) MarshalJSON() ([]byte, error)

func (*EmptyArrayDefault[T]) UnmarshalJSON added in v0.1.14

func (b *EmptyArrayDefault[T]) UnmarshalJSON(data []byte) error

type ErrorResponse

type ErrorResponse struct {
	Code     int32 `json:"code"`
	HTTPCode int32
	Message  string `json:"message"`
	Errors   struct {
		Children struct {
			Content struct {
				Errors []string `json:"errors,omitempty"`
			} `json:"content,omitempty"`
			SSLForce struct {
				Errors []string `json:"errors,omitempty"`
			} `json:"sslForce,omitempty"`
			SSLCertificate struct {
				Errors []string `json:"errors,omitempty"`
			} `json:"sslCertificate,omitempty"`
			HandleDNS struct {
				Errors []string `json:"errors,omitempty"`
			} `json:"handleDns,omitempty"`
			Authentication struct {
				Errors []string `json:"errors,omitempty"`
			} `json:"authentication,omitempty"`
			Appcomponent struct {
				Errors []string `json:"errors,omitempty"`
			} `json:"appcomponent,omitempty"`
		} `json:"children"`
	} `json:"errors"`
}

func (ErrorResponse) Error

func (er ErrorResponse) Error() string

type HistoryRootJob added in v0.1.6

type HistoryRootJob struct {
	ID              IntID     `json:"id"`
	Status          IntStatus `json:"status"`
	Concurrency     int32     `json:"conc"`
	HaltOnException int32     `json:"hoe"`
	Message         string    `json:"msg"`
	DatetimeStamp   string    `json:"dt"`
}

type Image

type Image struct {
	ID                     IntID  `json:"id"`
	Name                   string `json:"name"`
	OperatingsystemVersion struct {
		ID              IntID  `json:"id"`
		Version         string `json:"version"`
		Type            string `json:"type"`
		Operatingsystem struct {
			ID   IntID  `json:"id"`
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"operatingsystem"`
	} `json:"operatingsystemVersion"`
}

type IntID added in v0.1.1

type IntID = int32

Type of all integers returned by the API.

func ParseID added in v0.1.1

func ParseID(id string) (IntID, error)

Parse an ID number for the API. Returns 0, err if the string is not a valid ID.

type IntStatus added in v0.1.1

type IntStatus = int32

In some cases, the API exposes internal int values for statuses instead of string names.

type IntTime added in v0.1.1

type IntTime = int64

Type of unix time stamps returned by the API.

type IntegrityCheck

type IntegrityCheck struct {
	ID          IntID  `json:"id"`
	DtRequested string `json:"dtRequested"`
	Status      string `json:"status"`
}

type IntegrityCreateRequest

type IntegrityCreateRequest struct {
	Dojobs    bool `json:"dojobs"`
	Forcejobs bool `json:"forcejobs"`
}

type Job

type Job struct {
	Action          string        `json:"action"`
	Dt              IntTime       `json:"dt"`
	Eclass          string        `json:"eClass"`
	Eid             IntID         `json:"eId"`
	Estring         string        `json:"eString"`
	ExcCode         int32         `json:"excCode"`
	ExcMsg          string        `json:"excMsg"`
	HaltOnException int32         `json:"hoe"`
	ID              IntID         `json:"id"`
	Jobs            []Job         `json:"jobs"`
	Logs            []interface{} `json:"logs"`
	Message         string        `json:"msg"`
	Service         string        `json:"service"`
	Status          IntStatus     `json:"status"`
	System          IntID         `json:"system"`
}

type JobGetVerbosity added in v0.1.1

type JobGetVerbosity string
const (
	JobVerbosityNormal      JobGetVerbosity = "normal"
	JobVerbosityVerbose     JobGetVerbosity = "verbose"
	JobVerbosityVeryVerbose JobGetVerbosity = "very_verbose"
)

type JobHistoryGetParams added in v0.1.1

type JobHistoryGetParams struct {
	ShowDeleted bool
	Verbosity   JobGetVerbosity
	PageableParams
}

type LocalizedString added in v0.1.14

type LocalizedString map[string]string

A string that may contain a variant for multiple languages, such as "en" and "nl".

type Login

type Login struct {
	Success bool `json:"success"`
	User    struct {
		ID           IntID    `json:"id"`
		Username     string   `json:"username"`
		Email        string   `json:"email"`
		Firstname    string   `json:"firstName"`
		Lastname     string   `json:"lastName"`
		Roles        []string `json:"roles"`
		Status       string   `json:"status"`
		Language     string   `json:"language"`
		Organisation struct {
			ID          IntID  `json:"id"`
			Name        string `json:"name"`
			Street      string `json:"street"`
			Housenumber string `json:"houseNumber"`
			Zip         string `json:"zip"`
			City        string `json:"city"`
		} `json:"organisation"`
		Country struct {
			ID   string `json:"id"`
			Name string `json:"name"`
		} `json:"country"`
		Fullname string `json:"fullname"`
	} `json:"user"`
	Hash    string `json:"hash"`
	Hash2FA string `json:"hash2fa"`
}

type LoginRequest

type LoginRequest struct {
	Username        string `json:"username"`
	Password        string `json:"password"`
	SixDigitCode    string `json:"6digitCode"`
	TrustThisDevice bool   `json:"trustThisDevice"`
	TwoFAToken      string `json:"2faToken"`
}

type Mailbox

type Mailbox struct {
	ID         IntID  `json:"id"`
	Name       string `json:"name"`
	Username   string `json:"username"`
	Status     string `json:"status"`
	OooEnabled bool   `json:"oooEnabled"`
	OooSubject string `json:"oooSubject"`
	OooText    string `json:"oooText"`
	Source     string `json:"source"`
	Mailgroup  struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"mailgroup"`
	System struct {
		ID       IntID  `json:"id"`
		Fqdn     string `json:"fqdn"`
		Hostname string `json:"hostname"`
	} `json:"system"`
	BillableitemDetail struct {
		ID IntID `json:"id"`
	} `json:"billableitemDetail"`
	StatusCategory string `json:"statusCategory"`
	PrimaryAddress string `json:"primaryAddress"`
	Aliases        int32  `json:"aliases"`
}

type MailboxAddress

type MailboxAddress struct {
	ID      IntID  `json:"id"`
	Address string `json:"address"`
	Status  string `json:"status"`
}

type MailboxAddressCreate

type MailboxAddressCreate struct {
	Address string `json:"address"`
}

type MailboxCreate

type MailboxCreate struct {
	Name       string `json:"name"`
	Password   string `json:"password"`
	OooEnabled bool   `json:"oooEnabled"`
	OooSubject string `json:"oooSubject"`
	OooText    string `json:"oooText"`
}

type MailboxDescribe

type MailboxDescribe struct {
	Mailbox
	Addresses []MailboxAddress `json:"addresses"`
}

type MailboxPut

type MailboxPut struct {
	Name       string `json:"name"`
	Password   string `json:"password"`
	OooEnabled bool   `json:"oooEnabled"`
	OooSubject string `json:"oooSubject"`
	OooText    string `json:"oooText"`
}

type MailboxShort

type MailboxShort struct {
	ID         IntID  `json:"id"`
	Name       string `json:"name"`
	Username   string `json:"username"`
	Status     string `json:"status"`
	OooEnabled bool   `json:"oooEnabled"`
	OooSubject string `json:"oooSubject"`
	OooText    string `json:"oooText"`
	Mailgroup  struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"mailgroup"`
	StatusCategory string `json:"statusCategory"`
	PrimaryAddress string `json:"primaryAddress"`
	Aliases        int32  `json:"aliases"`
}

type Mailforwarder

type Mailforwarder struct {
	ID          IntID    `json:"id"`
	Address     string   `json:"address"`
	Destination []string `json:"destination"`
	Status      string   `json:"status"`
	Mailgroup   struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"mailgroup"`
	Domain struct {
		ID         IntID  `json:"id"`
		Name       string `json:"name"`
		Domaintype struct {
			ID   IntID  `json:"id"`
			Name string `json:"name"`
		} `json:"domaintype"`
	} `json:"domain"`
}

type MailforwarderCreate

type MailforwarderCreate struct {
	Address     string `json:"address"`
	Destination string `json:"destination"`
}

type MailforwarderPut

type MailforwarderPut struct {
	Address     string `json:"address"`
	Destination string `json:"destination"`
}

type Mailgroup

type Mailgroup struct {
	ID          IntID  `json:"id"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	Status      string `json:"status"`
	Systemgroup struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"systemgroup"`
	Organisation  OrganisationRef `json:"organisation"`
	BillingStatus string          `json:"billingStatus"`
	DtExpires     IntTime         `json:"dtExpires"`
	Domains       []struct {
		ID          IntID           `json:"id"`
		Name        string          `json:"name"`
		MailPrimary bool            `json:"mailPrimary"`
		Domaintype  DomainExtension `json:"domaintype"`
	} `json:"domains"`
	ExternalInfo       interface{} `json:"externalInfo"`
	StatusCategory     string      `json:"statusCategory"`
	MailboxCount       int32       `json:"mailboxCount"`
	MailforwarderCount int32       `json:"mailforwarderCount"`
}

type MailgroupCreate

type MailgroupCreate struct {
	Name         string `json:"name"`
	Type         string `json:"type"`
	Organisation IntID  `json:"organisation"`
	Systemgroup  IntID  `json:"systemgroup"`
	AutoTeams    string `json:"autoTeams"`
	ExternalInfo string `json:"externalInfo"`
}

type MailgroupDomainAdd

type MailgroupDomainAdd struct {
	Domain        IntID `json:"domain"`
	HandleMailDns bool  `json:"handleMailDns"`
}

type MailgroupPut

type MailgroupPut struct {
	Name         string `json:"name"`
	Type         string `json:"type"`
	Organisation IntID  `json:"organisation"`
	Systemgroup  IntID  `json:"systemgroup"`
	AutoTeams    string `json:"autoTeams"`
}

type Network

type Network struct {
	NetworkRef
	UID             interface{}     `json:"uid"`
	Remarks         string          `json:"remarks"`
	Status          string          `json:"status"`
	Vlan            interface{}     `json:"vlan"`
	Ipv4            string          `json:"ipv4"`
	Netmaskv4       int32           `json:"netmaskv4"`
	Gatewayv4       string          `json:"gatewayv4"`
	Ipv6            string          `json:"ipv6"`
	Netmaskv6       int32           `json:"netmaskv6"`
	Gatewayv6       string          `json:"gatewayv6"`
	PublicIP4Native interface{}     `json:"publicIp4Native"`
	PublicIP6Native interface{}     `json:"publicIp6Native"`
	Full            interface{}     `json:"full"`
	Systemgroup     interface{}     `json:"systemgroup"`
	Organisation    OrganisationRef `json:"organisation"`
	Zone            struct {
		ID     IntID  `json:"id"`
		Name   string `json:"name"`
		Region struct {
			ID IntID `json:"id"`
		} `json:"region"`
	} `json:"zone"`
	Systemprovider struct {
		ID                 IntID  `json:"id"`
		API                string `json:"api"`
		Name               string `json:"name"`
		AdvancedNetworking bool   `json:"advancedNetworking"`
	} `json:"systemprovider"`
	Rzone4 interface{} `json:"rzone4"`
	Rzone6 interface{} `json:"rzone6"`
	Zones  []struct {
		ID     IntID  `json:"id"`
		Name   string `json:"name"`
		Region struct {
			ID   IntID  `json:"id"`
			Name string `json:"name"`
		} `json:"region"`
	} `json:"zones"`
	StatusCategory string `json:"statusCategory"`
}

type NetworkLocate

type NetworkLocate struct {
	Ipv4 []string `json:"ipv4"`
	Ipv6 []string `json:"ipv6"`
}

type NetworkPutRequest added in v0.1.8

type NetworkPutRequest struct {
	Remarks     string  `json:"remarks"`
	Description string  `json:"description"`
	Zones       []IntID `json:"zones"`
}

type NetworkRef

type NetworkRef struct {
	ID          IntID  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Public      bool   `json:"public"`
	Customer    bool   `json:"customer"`
	Internal    bool   `json:"internal"`
}

type Notification

type Notification struct {
	// Data here is stored in an anonymous struct
	// so we can deserialize it separately from Entity in UnmarshalJSON() below.
	NotificationData
	Entity interface{} `json:"entity"`
}

func (*Notification) UnmarshalJSON

func (n *Notification) UnmarshalJSON(data []byte) error

type NotificationData

type NotificationData struct {
	ID                IntID       `json:"id"`
	EnitityIndex      string      `json:"entityIndex"`
	EntityName        string      `json:"entityName"`
	DtStamap          string      `json:"dtStamp"`
	NotificationGroup string      `json:"notificationGroup"`
	Type              string      `json:"type"`
	EntityClass       string      `json:"entityClass"`
	EntityID          IntID       `json:"entityId"`
	RootEntityClass   string      `json:"rootEntityClass"`
	RootEntityID      IntID       `json:"rootEntityId"`
	Status            int32       `json:"status"`
	StatusDisplay     string      `json:"statusDisplay"`
	StatusCategory    string      `json:"statusCategory"`
	SendMode          int32       `json:"sendMode"`
	Priority          int32       `json:"priority"`
	Subject           interface{} `json:"subject"`
	Params            interface{} `json:"params"`
	UserID            IntID       `json:"userId"`
	Contacts          []struct {
		ID        IntID  `json:"id"`
		DtStamp   string `json:"dtStamp"`
		FullName  string `json:"fullName"`
		Language  string `json:"language"`
		Message   string `json:"message"`
		Status    int32  `json:"status"`
		Type      string `json:"type"`
		Value     string `json:"value"`
		ContactID IntID  `json:"contactId"`
	} `json:"contacts"`
	ExtraRecipients []string `json:"extraRecipients"`
	User            struct {
		ID               IntID    `json:"id"`
		Username         string   `json:"username"`
		Email            string   `json:"email"`
		FirstName        string   `json:"firstName"`
		LastName         string   `json:"lastName"`
		Fullname         string   `json:"fullname"`
		Roles            []string `json:"roles"`
		Status           string   `json:"status"`
		StatusCategory   string   `json:"statusCategory"`
		Language         string   `json:"language"`
		WebsiteOrderInfo string   `json:"websiteOrderInfo"`
		Organisation     struct {
			ID                 IntID  `json:"id"`
			Name               string `json:"name"`
			Street             string `json:"street"`
			HouseNumber        string `json:"houseNumber"`
			Zip                string `json:"zip"`
			City               string `json:"city"`
			Reseller           string `json:"reseller"`
			UpdateEntitiesOnly bool   `json:"updateEntitiesOnly"`
		} `json:"organisation"`
		Country struct {
			ID   string `json:"id"`
			Name string `json:"name"`
		} `json:"country"`
	} `json:"user"`
}

type Organisation

type Organisation struct {
	OrganisationRef
	TaxNumber   string `json:"taxNumber"`
	MustPayTax  bool   `json:"mustPayTax"`
	Street      string `json:"street"`
	HouseNumber string `json:"houseNumber"`
	Zip         string `json:"zip"`
	City        string `json:"city"`
	Country     struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"country"`
	// ResellerOrganisation
	Users []OrganisationUser `json:"users"`
	// RemarksToprintInvoice
	UpdateEntitiesOnly   bool                  `json:"updateEntitiesOnly"`
	ParentOrganisation   string                `json:"parentOrganisation"`
	ResellerOrganisation *ResellerOrganisation `json:"resellerOrganisation"`
}

type OrganisationAccess

type OrganisationAccess struct {
	OrganisationRef
	Users []OrganisationUser `json:"users"`
	Type  string             `json:"type"`
}

Returned from endpoints such as GET /system/{systemID}/organisations

type OrganisationCreate

type OrganisationCreate struct {
	Name                 string  `json:"name"`
	TaxNumber            string  `json:"taxNumber"`
	ResellerOrganisation *IntID  `json:"resellerOrganisation"`
	ParentOrganisation   *string `json:"parentOrganisation"`
	ExternalID           *int64  `json:"externalId"`
	Street               string  `json:"street"`
	HouseNumber          int32   `json:"houseNumber"`
	Zip                  int32   `json:"zip"`
	City                 string  `json:"city"`
	Country              string  `json:"country"`
}

type OrganisationRef

type OrganisationRef struct {
	ID   IntID  `json:"id"`
	Name string `json:"name"`
}

type OrganisationUser

type OrganisationUser struct {
	ID        IntID    `json:"id"`
	Username  string   `json:"name"`
	Email     string   `json:"email"`
	FirstName string   `json:"firstName"`
	LastName  string   `json:"lastName"`
	Roles     []string `json:"roles"`
}

type PageableParams added in v0.1.1

type PageableParams struct {
	Limit  int32
	Offset int32
}

Common parameters for APIs that support pagination.

type ParameterList added in v0.1.14

type ParameterList = BuggyMap[string, ParameterValue]

type ParameterValue added in v0.1.14

type ParameterValue = interface{}

type ParentTemplates added in v0.1.14

type ParentTemplates struct {
	All   []string `json:"all"`
	OneOf []string `json:"one_of"`
}

type Region

type Region struct {
	ID      IntID  `json:"id"`
	Name    string `json:"name"`
	Country struct {
		ID   string `json:"id"`
		Name string `json:"name"`
	} `json:"country"`
	Systemprovider struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
		API  string `json:"api"`
	} `json:"systemprovider"`
}

type RequestTracer

type RequestTracer interface {
	TraceRequest(method string, url string, reqData []byte)
	TraceResponse(response *http.Response)
	TraceResponseBody(response *http.Response, respData []byte)
}

type ResellerOrganisation added in v0.1.5

type ResellerOrganisation struct {
	OrganisationRef
	TaxNumber string `json:"taxNumber"`
}

type RootTask added in v0.1.16

type RootTask struct {
	Id                    IntID                     `json:"id"`
	Template              *string                   `json:"template"`
	Package               *string                   `json:"package"`
	Status                string                    `json:"status"`
	PaymentStatus         string                    `json:"paymentStatus"`
	Parameters            map[string]ParameterValue `json:"params"`
	Products              []interface{}             `json:"products"`
	DtExecute             string                    `json:"dtExecute"`
	RootTaskHasEntities   []RootTaskHasEntity       `json:"rootTaskHasEntities"`
	Organisation          OrganisationRef           `json:"organisation"`
	StatusCategory        string                    `json:"statusCategory"`
	PaymentStatusCategory string                    `json:"paymentStatusCategory"`
	MaxWeight             int                       `json:"maxWeight"`
	ExtraData             interface{}               `json:"extraData"`
	BillableItem          interface{}               `json:"billableitem"`
}

type RootTaskCreate added in v0.1.16

type RootTaskCreate struct {
	Template     *string
	Package      *string
	DtExecute    *IntTime
	Organisation IntID
	Parameters   map[string]ParameterValue
}

func (*RootTaskCreate) MarshalJSON added in v0.1.16

func (rtc *RootTaskCreate) MarshalJSON() ([]byte, error)

type RootTaskHasEntity added in v0.1.16

type RootTaskHasEntity struct {
	Id          IntID       `json:"id"`
	Status      IntStatus   `json:"status"`
	EntityClass string      `json:"entityClass"`
	EntityId    string      `json:"entityId"`
	Identifier  string      `json:"identifier"`
	ExtraData   interface{} `json:"extraData"`
}

type SshKey

type SshKey struct {
	ID           IntID           `json:"id"`
	Description  string          `json:"description"`
	Content      string          `json:"content"`
	Status       string          `json:"status"`
	Fingerprint  string          `json:"fingerprint"`
	Organisation OrganisationRef `json:"organisation"`
}

type SshKeyCreate added in v0.1.8

type SshKeyCreate struct {
	Description string `json:"description"`
	Content     string `json:"content"`
}

type SslCertificate

type SslCertificate struct {
	ID                 IntID       `json:"id"`
	Name               string      `json:"name"`
	SslType            string      `json:"sslType"`
	SslKey             string      `json:"sslKey"`
	NewSslKey          string      `json:"newSslKey"`
	SslCrt             string      `json:"sslCrt"`
	SslCabundle        string      `json:"sslCabundle"`
	AutoURLLink        bool        `json:"autoUrlLink"`
	SslForce           bool        `json:"sslForce"`
	SslStatus          string      `json:"sslStatus"`
	Status             string      `json:"status"`
	ReminderStatus     string      `json:"reminderStatus"`
	DtExpires          string      `json:"dtExpires"`
	ValidationParams   interface{} `json:"validationParams"`
	Source             interface{} `json:"source"`
	SslCertificateUrls []struct {
		ID                IntID       `json:"id"`
		Content           string      `json:"content"`
		SslStatus         string      `json:"sslStatus"`
		ErrorMsg          interface{} `json:"errorMsg"`
		SslStatusCategory string      `json:"sslStatusCategory"`
		ValidationType    string      `json:"validationType"`
	} `json:"sslCertificateUrls"`

	BillableitemDetail interface{} `json:"billableitemDetail"`
	StatusCategory     string      `json:"statusCategory"`
	SslStatusCategory  string      `json:"sslStatusCategory"`
	Urls               []struct {
		ID             IntID  `json:"id"`
		Content        string `json:"content"`
		Status         string `json:"status"`
		StatusCategory string `json:"statusCategory"`
	} `json:"urls"`
	MatchingUrls []string `json:"matchingUrls"`
}

-- type of ssl certificate

type StatSummary

type StatSummary struct {
	Unit           string `json:"unit"`
	Value          string `json:"value"`
	StatusCategory string `json:"statusCategory"`
}

type System

type System struct {
	SystemRef
	Uid                   string `json:"uid"`
	Hostname              string `json:"hostname"`
	Type                  string `json:"type"`
	Status                string `json:"status"`
	StatusCategory        string `json:"statusCategory"`
	RunningStatus         string `json:"runningStatus"`
	RunningStatusCategory string `json:"runningStatusCategory"`
	Cpu                   int32  `json:"cpu"`
	Memory                int32  `json:"memory"`
	Disk                  string `json:"disk"`
	MonitoringEnabled     bool   `json:"monitoringEnabled"`
	ManagementType        string `json:"managementType"`
	Organisation          struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"organisation"`
	SystemImage            *SystemImage `json:"systemimage"`
	OperatingSystemVersion *struct {
		ID        IntID  `json:"id"`
		OsID      IntID  `json:"osId"`
		OsName    string `json:"osName"`
		OsType    string `json:"osType"`
		OsVersion string `json:"osVersion"`
	} `json:"operatingsystemVersion"`
	ProviderID                  IntID                           `json:"providerId"`
	Provider                    interface{}                     `json:"provider"`
	ProviderApi                 string                          `json:"providerApi"`
	SystemProviderConfiguration *SystemProviderConfigurationRef `json:"systemproviderConfiguration"`
	Region                      string                          `json:"region"`
	Zone                        *struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"zone"`
	Networks         []SystemNetwork `json:"networks"`
	PublicNetworking bool            `json:"publicNetworking"`
	StatsSummary     struct {
		DiskSpace StatSummary `json:"diskspace"`
		Memory    StatSummary `json:"Memory"`
		Cpu       StatSummary `json:"cpu"`
	} `json:"statsSummary"`
	DtExpires     IntTime `json:"dtExpires"`
	BillingStatus string  `json:"billingStatus"`
	ExternalInfo  string  `json:"externalInfo"`
	Remarks       string  `json:"remarks"`
	Groups        []struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"groups"`
	Jobs         []Job `json:"jobs"`
	ParentSystem *struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"parentsystem"`
	InstallSecurityUpdates int32 `json:"installSecurityUpdates"`
	LimitRiops             int32 `json:"limitRiops"`
	LimitWiops             int32 `json:"limitWiops"`
	BootVolume             struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"bootVolume"`
	Cookbooks             []Cookbook `json:"cookbooks"`
	Preferredparentsystem *struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"preferredparentsystem"`
	Maintenance      bool   `json:"maintenance"`
	DtMaintenanceEnd string `json:"dtMaintenanceEnd"`
}

structure of system type returned by API.

type SystemCheck

type SystemCheck struct {
	ID                          IntID                                  `json:"id"`
	CheckType                   string                                 `json:"checktype"`
	ChecktypeLocation           string                                 `json:"checktypeLocation"`
	Status                      string                                 `json:"status"`
	StatusInformation           string                                 `json:"statusInformation"`
	DtLastMonitorEnabled        IntTime                                `json:"dtLastMonitoringEnabled"`
	DtLastStatusChanged         IntTime                                `json:"dtLastStatusChange"`
	DtNextCheck                 IntTime                                `json:"dtNextCheck"`
	DtLastCheck                 IntTime                                `json:"dtLastCheck"`
	CheckParameters             BuggyMap[string, systemCheckParameter] `json:"checkparameters"`
	CheckParametersDescriptions BuggyMap[string, interface{}]          `json:"checkparameterDescriptions"`
	Location                    string                                 `json:"location"`
	System                      struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"system"`
	Alerts []interface{} `json:"alerts"`
}

type SystemCheckGet

type SystemCheckGet struct {
	ID                          IntID       `json:"id"`
	CheckType                   string      `json:"checktype"`
	ChecktypeLocation           string      `json:"checktypeLocation"`
	Status                      string      `json:"status"`
	StatusInformation           string      `json:"statusInformation"`
	StatusCategory              string      `json:"statusCategory"`
	DtLastMonitorEnabled        IntTime     `json:"dtLastMonitoringEnabled"`
	DtLastStatusChanged         IntTime     `json:"dtLastStatusChange"`
	DtNextCheck                 IntTime     `json:"dtNextCheck"`
	DtLastCheck                 IntTime     `json:"dtLastCheck"`
	CheckParameters             interface{} `json:"checkparameters"`
	CheckParametersDescriptions interface{} `json:"checkparameterDescriptions"`
	Location                    string      `json:"location"`
	System                      struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"system"`
	Alerts []interface{} `json:"alerts"`
}

type SystemCheckType

type SystemCheckType struct {
	ServiceType struct {
		Name            string `json:"name"`
		DisplayName     string `json:"displayName"`
		Description     string `json:"descriptiom"`
		Location        string `json:"location"`
		AlwaysApply     bool   `json:"alwaysApply"`
		OperatingSystem string `json:"operatingSystem"`
		EntityType      string `json:"entityType"`
		Parameters      []struct {
			Name         string      `json:"name"`
			Description  string      `json:"description"`
			Type         string      `json:"type"`
			DefaultValue interface{} `json:"defaultValue"`
			Mandatory    bool        `json:"mandatory"`
		} `json:"parameters"`
	} `json:"servicetype"`
}

type SystemCheckTypeName

type SystemCheckTypeName map[string]SystemCheckType

-- used to get all current check

type SystemHasNetwork

type SystemHasNetwork struct {
	ID             IntID       `json:"id"`
	Mac            string      `json:"mac"`
	Status         string      `json:"status"`
	StatusCategory string      `json:"statusCategory"`
	ExternalID     interface{} `json:"externalId"`
	Network        NetworkRef  `json:"network"`
}

type SystemHasNetworkIp

type SystemHasNetworkIp struct {
	ID               IntID       `json:"id"`
	Ipv4             string      `json:"ipv4"`
	PublicIpv4       string      `json:"publicIpv4"`
	Ipv6             string      `json:"ipv6"`
	PublicIpv6       string      `json:"publicIpv6"`
	Hostname         string      `json:"hostname"`
	Status           string      `json:"status"`
	ExternalID       interface{} `json:"externalId"`
	SystemHasNetwork struct {
		ID     IntID `json:"id"`
		System struct {
			ID   IntID  `json:"id"`
			Name string `json:"name"`
		} `json:"system"`
	} `json:"systemHasNetwork"`
	StatusCategory string `json:"statusCategory"`
}

type SystemHasNetworkIpAdd

type SystemHasNetworkIpAdd struct {
	Ipv4       string      `json:"ipv4"`
	PublicIpv4 string      `json:"publicIpv4"`
	Ipv6       string      `json:"ipv6"`
	PublicIpv6 string      `json:"publicIpv6"`
	Hostname   string      `json:"hostname"`
	ExternalID interface{} `json:"externalId"`
}

type SystemHasNetworkIpPut

type SystemHasNetworkIpPut struct {
	Hostname string `json:"hostname"`
}

type SystemImage added in v0.1.8

type SystemImage struct {
	ID          IntID  `json:"id"`
	Name        string `json:"name"`
	ExternalID  string `json:"externalId"`
	OsID        IntID  `json:"osId"`
	OsName      string `json:"osName"`
	OsType      string `json:"osType"`
	OsVersion   string `json:"osVersion"`
	OsVersionID IntID  `json:"osVersionId"`
}

type SystemNetwork

type SystemNetwork struct {
	ID           IntID  `json:"id"`
	Mac          string `json:"mac"`
	NetworkID    IntID  `json:"networkId"`
	Name         string `json:"name"`
	UID          string `json:"uid"`
	NetIpv4      string `json:"netIpv4"`
	NetGatewayv4 string `json:"netGatewayv4"`
	NetMaskv4    int32  `json:"netMaskv4"`
	NetIpv6      string `json:"netIpv6"`
	NetGatewayv6 string `json:"netGatewayv6"`
	NetMaskv6    int32  `json:"netMaskv6"`
	NetPublic    bool   `json:"netPublic"`
	NetCustomer  bool   `json:"netCustomer"`
	NetInternal  bool   `json:"netInternal"`
	Vlan         int32  `json:"vlan"`
	Ips          []struct {
		ID         IntID  `json:"id"`
		PublicIpv4 string `json:"publicIpv4"`
		Ipv4       string `json:"ipv4"`
		PublicIpv6 string `json:"publicIpv6"`
		Ipv6       string `json:"ipv6"`
		Hostname   string `json:"hostname"`
	} `json:"ips"`
	Destinationv4 []string `json:"destinationv4"`
	Destinationv6 []string `json:"destinationv6"`
	NetslotNumber int32    `json:"netslotNumber"`
}

type SystemPost

type SystemPost struct {
	Name                        string `json:"name"`
	CustomerFqdn                string `json:"customerFqdn"`
	Remarks                     string `json:"remarks"`
	Disk                        *int32 `json:"disk"`
	Cpu                         *int32 `json:"cpu"`
	Memory                      *int32 `json:"memory"`
	MamanagementType            string `json:"managementType"`
	PublicNetworking            bool   `json:"publicNetworking"`
	SystemImage                 IntID  `json:"systemimage"`
	Organisation                IntID  `json:"organisation"`
	SystemProviderConfiguration IntID  `json:"systemproviderConfiguration"`
	Zone                        IntID  `json:"zone"`
	// InstallSecurityUpdates      *int32           `json:"installSecurityUpdates"`
	AutoTeams              string        `json:"autoTeams"`
	ExternalInfo           string        `json:"externalInfo"`
	OperatingSystemVersion *IntID        `json:"operatingsystemVersion"`
	ParentSystem           *IntID        `json:"parentsystem"`
	Type                   string        `json:"type"`
	AutoNetworks           []interface{} `json:"autoNetworks"`
}

data needed for POST request (create system)

type SystemProvider

type SystemProvider struct {
	ID                 IntID                 `json:"id"`
	Name               string                `json:"name"`
	API                string                `json:"api"`
	AdvancedNetworking bool                  `json:"advancedNetworking"`
	Icon               string                `json:"icon"`
	Images             []SystemProviderImage `json:"images"`
}

type SystemProviderConfiguration

type SystemProviderConfiguration struct {
	SystemProviderConfigurationRef
	MinCPU         int32  `json:"minCpu"`
	MaxCPU         int32  `json:"maxCpu"`
	MinMemory      string `json:"minMemory"`
	MaxMemory      string `json:"maxMemory"`
	MinDisk        int32  `json:"minDisk"`
	MaxDisk        int32  `json:"maxDisk"`
	Status         int32  `json:"status"`
	Systemprovider struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"systemprovider"`
}

type SystemProviderConfigurationRef

type SystemProviderConfigurationRef struct {
	ID          IntID  `json:"id"`
	Name        string `json:"name"`
	ExternalID  string `json:"externalId"`
	Description string `json:"description"`
}

-------------------

type SystemProviderImage

type SystemProviderImage struct {
	ID         IntID       `json:"id"`
	Name       string      `json:"name"`
	ExternalID string      `json:"externalId"`
	TemplateID interface{} `json:"templateId"`
	Region     struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"region"`
	OperatingSystemID      IntID  `json:"operatingSystemId"`
	OperatingSystem        string `json:"operatingSystem"`
	OperatingSystemVersion struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"operatingSystemVersion"`
}

type SystemPut

type SystemPut struct {
	ID                          IntID  `json:"id"`
	Name                        string `json:"name"`
	Type                        string `json:"type"`
	Cpu                         int32  `json:"cpu"`
	Memory                      int32  `json:"memory"`
	Disk                        string `json:"disk"`
	ManagementType              string `json:"managementType"`
	Organisation                IntID  `json:"organisation"`
	SystemImage                 *IntID `json:"systemimage"`
	OperatingsystemVersion      *IntID `json:"operatingsystemVersion"`
	SystemProviderConfiguration *IntID `json:"systemproviderConfiguration"`
	Zone                        *IntID `json:"zone"`
	PublicNetworking            bool   `json:"publicNetworking"`
	Preferredparentsystem       *IntID `json:"preferredparentsystem"`
	Remarks                     string `json:"remarks"`
	InstallSecurityUpdates      int32  `json:"installSecurityUpdates"`
	LimitRiops                  int32  `json:"limitRiops"`
	LimitWiops                  int32  `json:"limitWiops"`
	CustomerFqdn                string `json:"customerFqdn"`
}

type SystemRef

type SystemRef struct {
	ID   IntID  `json:"id"`
	Fqdn string `json:"fqdn"`
	Name string `json:"name"`
}

type SystemSshkey

type SystemSshkey struct {
	ID           IntID           `json:"id"`
	Description  string          `json:"description"`
	Fingerprint  string          `json:"fingerprint"`
	Organisation OrganisationRef `json:"organisation"`
	User         struct {
		ID             IntID  `json:"id"`
		FirstName      string `json:"firstName"`
		LastName       string `json:"lastName"`
		Status         string `json:"status"`
		StatusCategory string `json:"statusCategory"`
	} `json:"user"`
	ShsID             IntID  `json:"shsId"`
	ShsStatusCategory string `json:"shsStatusCategory"`
	ShsStatus         string `json:"shsStatus"`
}

type SystemVolume

type SystemVolume struct {
	ID           IntID           `json:"id"`
	Name         string          `json:"name"`
	Status       string          `json:"status"`
	Space        int32           `json:"space"`
	UID          string          `json:"uid"`
	Remarks      interface{}     `json:"remarks"`
	AutoResize   bool            `json:"autoResize"`
	DeviceName   string          `json:"deviceName"`
	Organisation OrganisationRef `json:"organisation"`
	System       SystemRef       `json:"system"`
	Volumegroup  struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"volumegroup"`
	StatusCategory string `json:"statusCategory"`
}

type Systemgroup

type Systemgroup struct {
	ID      IntID  `json:"id"`
	Name    string `json:"name"`
	Status  string `json:"status"`
	Shared  bool   `json:"shared"`
	Systems []struct {
		ID   IntID  `json:"id"`
		Name string `json:"name"`
	} `json:"sg-systems"`
	Organisation OrganisationRef `json:"organisation"`
}

----------------------------------- SYSTEMGROUPS ---------------------------------- structure of a system group returned by API

type SystemgroupRequest

type SystemgroupRequest struct {
	Name         string `json:"name"`
	Organisation IntID  `json:"organisation"`
}

request type for creating systemgroup.

type Team added in v0.1.8

type Team struct {
	ID        IntID  `json:"id"`
	Name      string `json:"name"`
	AdminOnly bool   `json:"adminOnly"`
	Users     []struct {
		ID            IntID    `json:"id"`
		Username      string   `json:"username"`
		FirstName     string   `json:"firstName"`
		LastName      string   `json:"lastName"`
		Roles         []string `json:"roles"`
		Status        string   `json:"status"`
		TeamStatus    string   `json:"teamStatus"`
		UserHasTeamID IntID    `json:"userHasTeamId"`
	} `json:"users"`
	Entities []struct {
		ObjectID IntID  `json:"objectId"`
		Object   string `json:"object"`
	} `json:"entities"`
	TeamEntities struct {
		Apps []struct {
			ID   IntID  `json:"id"`
			Name string `json:"name"`
		} `json:"apps"`
		Domains []struct {
			ID       IntID  `json:"id"`
			Fullname string `json:"fullname"`
		} `json:"domains"`
		Mailgroups []struct {
			ID      IntID  `json:"id"`
			Name    string `json:"name"`
			Domains []struct {
				ID          IntID  `json:"id"`
				Name        string `json:"name"`
				MailPrimary bool   `json:"mailPrimary"`
				Domaintype  struct {
					ID        IntID  `json:"id"`
					Extension string `json:"extension"`
				} `json:"domaintype"`
			} `json:"domains"`
		} `json:"mailgroups"`
		Systems []struct {
			ID   IntID  `json:"id"`
			Name string `json:"name"`
		} `json:"systems"`
	} `json:"teamEntities"`
}

type TeamEntity added in v0.1.8

type TeamEntity struct {
	// ID of the team <-> entity relation itself.
	ID IntID `json:"id"`

	// Type of the entity.
	Object string `json:"object"`

	// ID of the entity.
	ObjectID IntID `json:"objectId"`
}

Represents an entity that a team has access to.

type Template added in v0.1.14

type Template struct {
	Name           string                       `json:"name"`
	Task           string                       `json:"task"`
	Roles          []string                     `json:"roles"`
	Products       []interface{}                `json:"products"`
	Parameters     map[string]TemplateParameter `json:"parameters"`
	Description    LocalizedString              `json:"description"`
	DisplayName    LocalizedString              `json:"displayName"`
	CanBeUsedAlone bool                         `json:"canBeUsedAlone"`
	PaymentPeriods struct {
		Pre  int32 `json:"pre"`
		Post int32 `json:"post"`
	} `json:"paymentPeriods"`
	ParentTemplates       EmptyArrayDefault[ParentTemplates] `json:"parentTemplates"`
	CustomPackagePossible bool                               `json:"customPackagePossible"`
}

type TemplateGetSingleRequest added in v0.1.14

type TemplateGetSingleRequest struct {
	CustomPackagePossible bool
}

type TemplateParameter added in v0.1.14

type TemplateParameter struct {
	Type               string          `json:"type"`
	Default            interface{}     `json:"default"`
	ReadOnly           bool            `json:"readOnly"`
	Required           bool            `json:"required"`
	DisplayName        LocalizedString `json:"displayName"`
	RequiredByRootTask bool            `json:"requiredByRootTask"`
}

type TemplateShort added in v0.1.14

type TemplateShort struct {
	Name        string          `json:"name"`
	DisplayName LocalizedString `json:"displayName"`
	Description LocalizedString `json:"description"`
}

type User

type User struct {
	ID             IntID    `json:"id"`
	Username       string   `json:"username"`
	Email          string   `json:"email"`
	FirstName      string   `json:"firstName"`
	LastName       string   `json:"lastName"`
	Roles          []string `json:"roles"`
	Status         string   `json:"status"`
	StatusCategory string   `json:"statusCategory"`
	Language       string   `json:"language"`
	Fullname       string   `json:"fullname"`
}

type Volume

type Volume struct {
	ID             IntID           `json:"id"`
	Name           string          `json:"name"`
	Status         string          `json:"status"`
	Space          int32           `json:"space"`
	UID            string          `json:"uid"`
	Remarks        interface{}     `json:"remarks"`
	AutoResize     bool            `json:"autoResize"`
	DeviceName     string          `json:"deviceName"`
	Organisation   OrganisationRef `json:"organisation"`
	System         SystemRef       `json:"system"`
	Volumegroup    VolumegroupRef  `json:"volumegroup"`
	StatusCategory string          `json:"statusCategory"`
}

type VolumeCreate

type VolumeCreate struct {
	Name         string `json:"name"`
	Space        int32  `json:"space"`
	Organisation IntID  `json:"organisation"`
	System       IntID  `json:"system"`
	Volumegroup  *IntID `json:"volumegroup"`
	AutoResize   bool   `json:"autoResize"`
	DeviceName   string `json:"deviceName"`
}

type VolumePut

type VolumePut struct {
	Name         string      `json:"name"`
	DeviceName   string      `json:"deviceName"`
	Space        int32       `json:"space"`
	Organisation IntID       `json:"organisation"`
	AutoResize   bool        `json:"autoResize"`
	Remarks      interface{} `json:"remarks"`
	System       IntID       `json:"system"`
	Volumegroup  IntID       `json:"volumegroup"`
}

type VolumegroupRef

type VolumegroupRef struct {
	ID   IntID  `json:"id"`
	Name string `json:"name"`
}

type Zone

type Zone struct {
	ID        IntID  `json:"id"`
	Name      string `json:"name"`
	ShortName string `json:"shortName"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL