do

package
v1.148.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 25 Imported by: 34

Documentation

Index

Constants

View Source
const (

	// ForbiddenConfigShared ...
	ForbiddenConfigShared = "shared"
	// ForbiddenConfigWebSecure ...
	ForbiddenConfigWebSecure = "webSecure"
	// ForbiddenConfigSequence ...
	ForbiddenConfigSequence = "sequence"
	// ForbiddenConfigProvideAPIKeyAnnotation ...
	ForbiddenConfigProvideAPIKeyAnnotation = "provideAPIKeyAnnotation"
	// ForbiddenConfigRequireWhiskAuthAnnotation ...
	ForbiddenConfigRequireWhiskAuthAnnotation = "provideWhiskAuthAnnotation"

	// ForbiddenAnnotationProvideAPIKey ...
	ForbiddenAnnotationProvideAPIKey = "provide-api-key"
	// ForbiddenAnnotationRequireWhiskAuth ...
	ForbiddenAnnotationRequireWhiskAuth = "require-whisk-auth"
)
View Source
const (

	// CredentialsFile is the name of the file where the sandbox plugin stores OpenWhisk credentials.
	CredentialsFile = "credentials.json"
)
View Source
const RegistryHostname = "registry.digitalocean.com"

RegistryHostname is the hostname for the DO registry

Variables

View Source
var (
	// ErrServerlessNotInstalled is the error returned to users when the sandbox is not installed.
	ErrServerlessNotInstalled = errors.New("serverless support is not installed (use `doctl serverless install`)")

	// ErrServerlessNeedsUpgrade is the error returned to users when the sandbox is at too low a version
	ErrServerlessNeedsUpgrade = errors.New("serverless support needs to be upgraded (use `doctl serverless upgrade`)")

	// ErrServerlessNotConnected is the error returned to users when the sandbox is not connected to a namespace
	ErrServerlessNotConnected = errors.New("serverless support is installed but not connected to a functions namespace (use `doctl serverless connect`)")
)

Functions

func GetCredentialDirectory added in v1.80.0

func GetCredentialDirectory(leafDir string, serverlessDir string) string

GetCredentialDirectory returns the directory in which credentials should be stored for a given CmdConfig. The actual leaf directory is a function of the access token being used. This ties serverless credentials to DO credentials

func GetCurrentServerlessVersion added in v1.80.0

func GetCurrentServerlessVersion(serverlessDir string) string

GetCurrentServerlessVersion gets the version of the current plugin. To be called only when the plugin is known to exist. Returns "0" if the installed plugin pre-dates the versioning system Otherwise, returns the version string stored in the serverless directory.

func GetMinServerlessVersion added in v1.80.0

func GetMinServerlessVersion() string

GetMinServerlessVersion returns the minServerlessVersion (allows the constant to be overridden via an environment variable)

func HashAccessToken added in v1.82.0

func HashAccessToken(token string) string

HashAccessToken converts a DO access token string into a shorter but suitably random string via hashing. This is used to form part of the path for storing OpenWhisk credentials

func ListForbiddenConfigs added in v1.80.0

func ListForbiddenConfigs(serverlessProject *ServerlessSpec) ([]string, error)

ListForbiddenConfigs returns a list of forbidden config values in a project spec.

func ListInvalidWebsecureValues added in v1.80.0

func ListInvalidWebsecureValues(serverlessProject *ServerlessSpec) ([]string, error)

ListInvalidWebsecureValues returns a list of forbidden websecure values for an action in a project spec. a valid websecure value is any string other than "true"

func PaginateResp

func PaginateResp(gen Generator) ([]any, error)

PaginateResp paginates a Response.

func PreserveCreds added in v1.80.0

func PreserveCreds(leafDir string, stagingDir string, serverlessDir string) error

PreserveCreds preserves existing credentials in a serverless directory that is about to be replaced by moving them to the staging directory containing the replacement.

Types

type Account

type Account struct {
	*godo.Account
}

Account is a wrapper for godo.Account.

type AccountService

type AccountService interface {
	Get() (*Account, error)
	RateLimit() (*RateLimit, error)
}

AccountService is an interface for interacting with DigitalOcean's account api.

func NewAccountService

func NewAccountService(godoClient *godo.Client) AccountService

NewAccountService builds an AccountService instance.

type Action

type Action struct {
	*godo.Action
}

Action is a wrapper for godo.Action

type Actions

type Actions []Action

Actions is a slice of Action.

type ActionsService

type ActionsService interface {
	List() (Actions, error)
	Get(int) (*Action, error)
}

ActionsService is an interface for interacting with DigitalOcean's action api.

func NewActionsService

func NewActionsService(godoClient *godo.Client) ActionsService

NewActionsService builds an ActionsService instance.

type Agent added in v1.131.0

type Agent struct {
	*godo.Agent
}

Agent wraps a godo.Agent.

type AgentRouteResponse added in v1.134.0

type AgentRouteResponse struct {
	*godo.AgentRouteResponse
}

type AgentVersion added in v1.134.0

type AgentVersion struct {
	*godo.AgentVersion
}

type AgentVersions added in v1.134.0

type AgentVersions []AgentVersion

type Agents added in v1.131.0

type Agents []Agent

Agents is a slice of Agent.

type AlertPolicies added in v1.63.1

type AlertPolicies []AlertPolicy

AlertPolicies is a slice of AlertPolicy.

type AlertPolicy added in v1.63.1

type AlertPolicy struct {
	*godo.AlertPolicy
}

AlertPolicy is a wrapper for godo.AlertPolicy

type ApiKeyInfo added in v1.134.0

type ApiKeyInfo struct {
	*godo.ApiKeyInfo
}

type ApiKeys added in v1.134.0

type ApiKeys []ApiKeyInfo

ApiKeys is a slice of ApiKey.

type AppsService added in v1.46.0

type AppsService interface {
	Create(req *godo.AppCreateRequest) (*godo.App, error)
	Find(appRef string) (*godo.App, error)
	Get(appID string) (*godo.App, error)
	List(withProjects bool) ([]*godo.App, error)
	Update(appID string, req *godo.AppUpdateRequest) (*godo.App, error)
	Delete(appID string) error
	Propose(req *godo.AppProposeRequest) (*godo.AppProposeResponse, error)

	Restart(appID string, components []string) (*godo.Deployment, error)
	CreateDeployment(appID string, forceRebuild bool) (*godo.Deployment, error)
	GetDeployment(appID, deploymentID string) (*godo.Deployment, error)
	ListDeployments(appID string) ([]*godo.Deployment, error)

	GetLogs(appID, deploymentID, component string, logType godo.AppLogType, follow bool, tail int) (*godo.AppLogs, error)
	// Deprecated: Use GetExecWithOpts instead
	GetExec(appID, deploymentID, componentName string) (*godo.AppExec, error)
	GetExecWithOpts(appID, componentName string, opts *godo.AppGetExecOptions) (*godo.AppExec, error)

	ListRegions() ([]*godo.AppRegion, error)

	ListTiers() ([]*godo.AppTier, error)
	GetTier(slug string) (*godo.AppTier, error)

	ListInstanceSizes() ([]*godo.AppInstanceSize, error)
	GetInstanceSize(slug string) (*godo.AppInstanceSize, error)

	ListAlerts(appID string) ([]*godo.AppAlert, error)
	UpdateAlertDestinations(appID, alertID string, update *godo.AlertDestinationUpdateRequest) (*godo.AppAlert, error)

	ListBuildpacks() ([]*godo.Buildpack, error)
	UpgradeBuildpack(appID string, options godo.UpgradeBuildpackOptions) (affectedComponents []string, deployment *godo.Deployment, err error)

	GetAppInstances(appID string, opts *godo.GetAppInstancesOpts) ([]*godo.AppInstance, error)

	ListJobInvocations(appID string, opts *godo.ListJobInvocationsOptions) ([]*godo.JobInvocation, error)
	GetJobInvocation(appID string, jobInvocationID string, opts *godo.GetJobInvocationOptions) (*godo.JobInvocation, error)
	GetJobInvocationLogs(appID, jobInvocationID string, opts *godo.GetJobInvocationLogsOptions) (*godo.AppLogs, error)
}

AppsService is the interface that wraps godo AppsService.

func NewAppsService added in v1.46.0

func NewAppsService(client *godo.Client) AppsService

NewAppsService builds an instance of AppsService.

type BYOIPPrefix added in v1.132.0

type BYOIPPrefix struct {
	BYOIPPrefix *godo.BYOIPPrefix
}

BYOIPPrefix wraps a godo BYOIPPrefix.

type BYOIPPrefixCreate added in v1.132.0

type BYOIPPrefixCreate struct {
	*godo.BYOIPPrefixCreateResp
}

type BYOIPPrefixResource added in v1.132.0

type BYOIPPrefixResource struct {
	BYOIPPrefixResource *godo.BYOIPPrefixResource
}

BYOIPPrefixResource wraps a godo BYOIPPrefixResource.

type BYOIPPrefixResources added in v1.132.0

type BYOIPPrefixResources []BYOIPPrefixResource

BYOIPPrefixResources is a slice of BYOIPPrefixResources.

type BYOIPPrefixes added in v1.132.0

type BYOIPPrefixes []BYOIPPrefix

BYOIPPrefixes is a slice of BYOIPPrefix.

type BYOIPPrefixsService added in v1.132.0

type BYOIPPrefixsService interface {
	List() (BYOIPPrefixes, error)
	Get(prefixUUID string) (*BYOIPPrefix, error)
	Create(ficr *godo.BYOIPPrefixCreateReq) (*godo.BYOIPPrefixCreateResp, error)
	Update(prefixUUID string, ucr *godo.BYOIPPrefixUpdateReq) (*BYOIPPrefix, error)
	Delete(prefixUUID string) error

	GetPrefixResources(prefixUUID string) (BYOIPPrefixResources, error)
}

BYOIPPrefixesService is the godo BYOIPPrefixesService interface.

func NewBYOIPPrefixService added in v1.132.0

func NewBYOIPPrefixService(client *godo.Client) BYOIPPrefixsService

NewBYOIPPrefixService builds an instance of BYOIPPrefixsService.

type Balance added in v1.37.0

type Balance struct {
	*godo.Balance
}

Balance is a wrapper for godo.Balance.

type BalanceService added in v1.37.0

type BalanceService interface {
	Get() (*Balance, error)
}

BalanceService is an interface for interacting with DigitalOcean's balance api.

func NewBalanceService added in v1.37.0

func NewBalanceService(godoClient *godo.Client) BalanceService

NewBalanceService builds an BalanceService instance.

type BillingHistory added in v1.40.0

type BillingHistory struct {
	*godo.BillingHistory
}

BillingHistory is a wrapper for godo.BillingHistory

type BillingHistoryService added in v1.40.0

type BillingHistoryService interface {
	List() (*BillingHistory, error)
}

BillingHistoryService is an interface for interacting with DigitalOcean's invoices api.

func NewBillingHistoryService added in v1.40.0

func NewBillingHistoryService(client *godo.Client) BillingHistoryService

NewBillingHistoryService builds an BillingHistoryService instance.

type CDN added in v1.9.0

type CDN struct {
	*godo.CDN
}

CDN is a wrapper for godo.CDN.

type CDNsService added in v1.9.0

type CDNsService interface {
	List() ([]CDN, error)
	Get(string) (*CDN, error)
	Create(*godo.CDNCreateRequest) (*CDN, error)
	UpdateTTL(string, *godo.CDNUpdateTTLRequest) (*CDN, error)
	UpdateCustomDomain(string, *godo.CDNUpdateCustomDomainRequest) (*CDN, error)
	FlushCache(string, *godo.CDNFlushCacheRequest) error
	Delete(string) error
}

CDNsService is an interface for interacting with DigitalOcean's CDN api.

func NewCDNsService added in v1.9.0

func NewCDNsService(godoClient *godo.Client) CDNsService

NewCDNsService builds an NewCDNsService instance.

type Certificate added in v1.6.0

type Certificate struct {
	*godo.Certificate
}

Certificate wraps a godo Certificate.

type Certificates added in v1.6.0

type Certificates []Certificate

Certificates is a slice of Certificate.

type CertificatesService added in v1.6.0

type CertificatesService interface {
	Get(cID string) (*Certificate, error)
	Create(cr *godo.CertificateRequest) (*Certificate, error)
	List() (Certificates, error)
	ListByName(cName string) (Certificates, error)
	Delete(cID string) error
}

CertificatesService is the godo CertificatesService interface.

func NewCertificatesService added in v1.6.0

func NewCertificatesService(client *godo.Client) CertificatesService

NewCertificatesService builds an instance of CertificatesService.

type Database added in v1.15.0

type Database struct {
	*godo.Database
}

Database is a wrapper for godo.Database

type DatabaseBackup added in v1.15.0

type DatabaseBackup struct {
	*godo.DatabaseBackup
}

DatabaseBackup is a wrapper for godo.DatabaseBackup

type DatabaseBackups added in v1.15.0

type DatabaseBackups []DatabaseBackup

DatabaseBackups is a slice of DatabaseBackup

type DatabaseCA added in v1.114.0

type DatabaseCA struct {
	*godo.DatabaseCA
}

DatabaseCA is a wrapper for godo.DatabaseCA

type DatabaseCAs added in v1.114.0

type DatabaseCAs []DatabaseCA

DatabaseCAs is a slice of DatabaseCA

type DatabaseConnection added in v1.15.0

type DatabaseConnection struct {
	*godo.DatabaseConnection
}

DatabaseConnection is a wrapper for godo.DatabaseConnection

type DatabaseDB added in v1.15.0

type DatabaseDB struct {
	*godo.DatabaseDB
}

DatabaseDB is a wrapper for godo.DatabaseDB

type DatabaseDBs added in v1.15.0

type DatabaseDBs []DatabaseDB

DatabaseDBs is a slice of DatabaseDB

type DatabaseEvent added in v1.106.0

type DatabaseEvent struct {
	*godo.DatabaseEvent
}

DatabaseEvent is a wrapper for godo.DatabaseEvent

type DatabaseEvents added in v1.106.0

type DatabaseEvents []DatabaseEvent

DatabaseEvents is a slice of DatabaseEvent

type DatabaseFirewallRule added in v1.56.0

type DatabaseFirewallRule struct {
	*godo.DatabaseFirewallRule
}

DatabaseFirewallRule is a wrapper for godo.DatabaseFirewallRule

type DatabaseFirewallRules added in v1.56.0

type DatabaseFirewallRules []DatabaseFirewallRule

DatabaseFirewallRules is a slice of DatabaseFirewallRule

type DatabaseIndex added in v1.112.0

type DatabaseIndex struct {
	*godo.DatabaseIndex
}

DatabaseIndex is a wrapper for godo.DatabaseIndex

type DatabaseIndexes added in v1.112.0

type DatabaseIndexes []DatabaseIndex

DatabaseIndexes is a slice of DatabaseIndex

type DatabaseLayout added in v1.79.0

type DatabaseLayout struct {
	*godo.DatabaseLayout
}

DatabaseLayout is a wrapper for

type DatabaseMaintenanceWindow added in v1.15.0

type DatabaseMaintenanceWindow struct {
	*godo.DatabaseMaintenanceWindow
}

DatabaseMaintenanceWindow is a wrapper for godo.DatabaseMaintenanceWindow

type DatabaseOptions added in v1.79.0

type DatabaseOptions struct {
	*godo.DatabaseOptions
}

DatabaseOptions is a wrapper for

type DatabasePool added in v1.15.0

type DatabasePool struct {
	*godo.DatabasePool
}

DatabasePool is a wrapper for godo.DatabasePool

type DatabasePools added in v1.15.0

type DatabasePools []DatabasePool

DatabasePools is a slice of DatabasePool

type DatabaseReplica added in v1.15.0

type DatabaseReplica struct {
	*godo.DatabaseReplica
}

DatabaseReplica is a wrapper for godo.DatabaseReplica

type DatabaseReplicas added in v1.15.0

type DatabaseReplicas []DatabaseReplica

DatabaseReplicas is a slice of DatabaseReplica

type DatabaseTopic added in v1.101.0

type DatabaseTopic struct {
	*godo.DatabaseTopic
}

DatabaseTopic is a wrapper for godo.DatabaseTopic

type DatabaseTopicPartitions added in v1.101.0

type DatabaseTopicPartitions struct {
	Partitions []*godo.TopicPartition
}

DatabaseTopicPartitions is a slice of *godo.TopicPartition

type DatabaseTopics added in v1.101.0

type DatabaseTopics []DatabaseTopic

DatabaseTopics is a slice of DatabaseTopic

type DatabaseUser added in v1.15.0

type DatabaseUser struct {
	*godo.DatabaseUser
}

DatabaseUser is a wrapper for godo.DatabaseUser

type DatabaseUsers added in v1.15.0

type DatabaseUsers []DatabaseUser

DatabaseUsers is a slice of DatabaseUser

type Databases added in v1.15.0

type Databases []Database

Databases is a slice of Database

type DatabasesService added in v1.15.0

type DatabasesService interface {
	List() (Databases, error)
	Get(string) (*Database, error)
	GetCA(string) (*DatabaseCA, error)
	Create(*godo.DatabaseCreateRequest) (*Database, error)
	Delete(string) error
	GetConnection(string, bool) (*DatabaseConnection, error)
	ListBackups(string) (DatabaseBackups, error)
	Resize(string, *godo.DatabaseResizeRequest) error
	Migrate(string, *godo.DatabaseMigrateRequest) error

	GetMaintenance(string) (*DatabaseMaintenanceWindow, error)
	UpdateMaintenance(string, *godo.DatabaseUpdateMaintenanceRequest) error
	InstallUpdate(string) error

	GetUser(string, string) (*DatabaseUser, error)
	ListUsers(string) (DatabaseUsers, error)
	CreateUser(string, *godo.DatabaseCreateUserRequest) (*DatabaseUser, error)
	DeleteUser(string, string) error
	ResetUserAuth(string, string, *godo.DatabaseResetUserAuthRequest) (*DatabaseUser, error)

	ListDBs(string) (DatabaseDBs, error)
	CreateDB(string, *godo.DatabaseCreateDBRequest) (*DatabaseDB, error)
	GetDB(string, string) (*DatabaseDB, error)
	DeleteDB(string, string) error

	ListPools(string) (DatabasePools, error)
	CreatePool(string, *godo.DatabaseCreatePoolRequest) (*DatabasePool, error)
	GetPool(string, string) (*DatabasePool, error)
	UpdatePool(string, string, *godo.DatabaseUpdatePoolRequest) error
	DeletePool(string, string) error

	GetReplica(string, string) (*DatabaseReplica, error)
	ListReplicas(string) (DatabaseReplicas, error)
	CreateReplica(string, *godo.DatabaseCreateReplicaRequest) (*DatabaseReplica, error)
	DeleteReplica(string, string) error
	PromoteReplica(string, string) error
	GetReplicaConnection(string, string) (*DatabaseConnection, error)

	GetSQLMode(string) ([]string, error)
	SetSQLMode(string, ...string) error

	GetFirewallRules(string) (DatabaseFirewallRules, error)
	UpdateFirewallRules(databaseID string, req *godo.DatabaseUpdateFirewallRulesRequest) error

	ListOptions() (*DatabaseOptions, error)

	GetMySQLConfiguration(databaseID string) (*MySQLConfig, error)
	GetPostgreSQLConfiguration(databaseID string) (*PostgreSQLConfig, error)
	GetRedisConfiguration(databaseID string) (*RedisConfig, error)
	GetValkeyConfiguration(databaseID string) (*ValkeyConfig, error)
	GetMongoDBConfiguration(databaseID string) (*MongoDBConfig, error)
	GetKafkaConfiguration(databaseID string) (*KafkaConfig, error)
	GetOpensearchConfiguration(databaseID string) (*OpensearchConfig, error)

	UpdateMySQLConfiguration(databaseID string, confString string) error
	UpdatePostgreSQLConfiguration(databaseID string, confString string) error
	UpdateRedisConfiguration(databaseID string, confString string) error
	UpdateValkeyConfiguration(databaseID string, confString string) error
	UpdateMongoDBConfiguration(databaseID string, confString string) error
	UpdateKafkaConfiguration(databaseID string, confString string) error
	UpdateOpensearchConfiguration(databaseID string, confString string) error

	ListTopics(string) (DatabaseTopics, error)
	GetTopic(string, string) (*DatabaseTopic, error)
	CreateTopic(string, *godo.DatabaseCreateTopicRequest) (*DatabaseTopic, error)
	UpdateTopic(string, string, *godo.DatabaseUpdateTopicRequest) error
	DeleteTopic(string, string) error

	ListDatabaseEvents(string) (DatabaseEvents, error)

	ListIndexes(string) (DatabaseIndexes, error)
	DeleteIndex(string, string) error
}

DatabasesService is an interface for interacting with DigitalOcean's Database API

func NewDatabasesService added in v1.15.0

func NewDatabasesService(client *godo.Client) DatabasesService

NewDatabasesService builds a DatabasesService instance.

type DatacenterRegion added in v1.139.0

type DatacenterRegion struct {
	*godo.DatacenterRegions
}

DatacenterRegion represents a datacenter region for GenAI services.

type DatacenterRegions added in v1.139.0

type DatacenterRegions []DatacenterRegion

DatacenterRegions is a slice of DatacenterRegion.

type Domain

type Domain struct {
	*godo.Domain
}

Domain wraps a godo Domain.

type DomainRecord

type DomainRecord struct {
	*godo.DomainRecord
}

DomainRecord wraps a godo DomainRecord.

type DomainRecordEditRequest added in v1.34.0

type DomainRecordEditRequest struct {
	Type     string `json:"type,omitempty"`
	Name     string `json:"name,omitempty"`
	Data     string `json:"data,omitempty"`
	Priority int    `json:"priority"`
	Port     *int   `json:"port,omitempty"`
	TTL      int    `json:"ttl,omitempty"`
	Weight   int    `json:"weight"`
	Flags    int    `json:"flags"`
	Tag      string `json:"tag,omitempty"`
}

A DomainRecordEditRequest is used in place of godo's DomainRecordEditRequest in order to work around the fact that we cannot send a port value of 0 via godo due to Go's JSON encoding logic.

type DomainRecords

type DomainRecords []DomainRecord

DomainRecords is a slice of DomainRecord.

type Domains

type Domains []Domain

Domains is a slice of Domain.

type DomainsService

type DomainsService interface {
	List() (Domains, error)
	Get(string) (*Domain, error)
	Create(*godo.DomainCreateRequest) (*Domain, error)
	Delete(string) error

	Records(string) (DomainRecords, error)
	Record(string, int) (*DomainRecord, error)
	DeleteRecord(string, int) error
	EditRecord(string, int, *DomainRecordEditRequest) (*DomainRecord, error)
	CreateRecord(string, *DomainRecordEditRequest) (*DomainRecord, error)
}

DomainsService is the godo DomainsService interface.

func NewDomainsService

func NewDomainsService(client *godo.Client) DomainsService

NewDomainsService builds an instance of DomainsService.

type Droplet

type Droplet struct {
	*godo.Droplet
}

Droplet is a wrapper for godo.Droplet

type DropletActionsService

type DropletActionsService interface {
	Shutdown(int) (*Action, error)
	ShutdownByTag(string) (Actions, error)
	PowerOff(int) (*Action, error)
	PowerOffByTag(string) (Actions, error)
	PowerOn(int) (*Action, error)
	PowerOnByTag(string) (Actions, error)
	PowerCycle(int) (*Action, error)
	PowerCycleByTag(string) (Actions, error)
	Reboot(int) (*Action, error)
	Restore(int, int) (*Action, error)
	Resize(int, string, bool) (*Action, error)
	Rename(int, string) (*Action, error)
	Snapshot(int, string) (*Action, error)
	SnapshotByTag(string, string) (Actions, error)
	EnableBackups(int) (*Action, error)
	EnableBackupsByTag(string) (Actions, error)
	DisableBackups(int) (*Action, error)
	DisableBackupsByTag(string) (Actions, error)
	ChangeBackupPolicy(int, *godo.DropletBackupPolicyRequest) (*Action, error)
	EnableBackupsWithPolicy(int, *godo.DropletBackupPolicyRequest) (*Action, error)
	PasswordReset(int) (*Action, error)
	RebuildByImageID(int, int) (*Action, error)
	RebuildByImageSlug(int, string) (*Action, error)
	ChangeKernel(int, int) (*Action, error)
	EnableIPv6(int) (*Action, error)
	EnableIPv6ByTag(string) (Actions, error)
	EnablePrivateNetworking(int) (*Action, error)
	EnablePrivateNetworkingByTag(string) (Actions, error)
	Get(int, int) (*Action, error)
	GetByURI(string) (*Action, error)
}

DropletActionsService is an interface for interacting with DigitalOcean's droplet action api.

func NewDropletActionsService

func NewDropletActionsService(godoClient *godo.Client) DropletActionsService

NewDropletActionsService builds an instance of DropletActionsService.

type DropletAutoscaleService added in v1.118.0

func NewDropletAutoscaleService added in v1.118.0

func NewDropletAutoscaleService(client *godo.Client) DropletAutoscaleService

NewDropletAutoscaleService creates an instance of DropletAutoscaleService

type DropletBackupPolicies added in v1.118.0

type DropletBackupPolicies []DropletBackupPolicy

DropletBackupPolicies is a slice of DropletBackupPolicy.

type DropletBackupPolicy added in v1.118.0

type DropletBackupPolicy struct {
	*godo.DropletBackupPolicy
}

DropletBackupPolicy is a wrapper for godo.DropletBackupPolicy.

type DropletIPTable

type DropletIPTable map[InterfaceType]string

DropletIPTable is a table of interface IPS.

type DropletSupportedBackupPolicies added in v1.118.0

type DropletSupportedBackupPolicies []DropletSupportedBackupPolicy

DropletSupportedBackupPolicies is a slice of DropletSupportedBackupPolicy.

type DropletSupportedBackupPolicy added in v1.118.0

type DropletSupportedBackupPolicy struct {
	*godo.SupportedBackupPolicy
}

DropletSupportedBackupPolicy is a wrapper for godo.SupportedBackupPolicy.

type Droplets

type Droplets []Droplet

Droplets is a slice of Droplet.

type DropletsService

type DropletsService interface {
	List() (Droplets, error)
	ListByTag(string) (Droplets, error)
	ListWithGPUs() (Droplets, error)
	Get(int) (*Droplet, error)
	Create(*godo.DropletCreateRequest, bool) (*Droplet, error)
	CreateMultiple(*godo.DropletMultiCreateRequest) (Droplets, error)
	Delete(int) error
	DeleteByTag(string) error
	Kernels(int) (Kernels, error)
	Snapshots(int) (Images, error)
	Backups(int) (Images, error)
	Actions(int) (Actions, error)
	Neighbors(int) (Droplets, error)
	GetBackupPolicy(int) (*DropletBackupPolicy, error)
	ListBackupPolicies() (DropletBackupPolicies, error)
	ListSupportedBackupPolicies() (DropletSupportedBackupPolicies, error)
}

DropletsService is an interface for interacting with DigitalOcean's droplet api.

func NewDropletsService

func NewDropletsService(client *godo.Client) DropletsService

NewDropletsService builds a DropletsService instance.

type Firewall added in v1.7.0

type Firewall struct {
	*godo.Firewall
}

Firewall wraps a godo Firewall.

type Firewalls added in v1.7.0

type Firewalls []Firewall

Firewalls is a slice of Firewall.

type FirewallsService added in v1.7.0

type FirewallsService interface {
	Get(fID string) (*Firewall, error)
	Create(fr *godo.FirewallRequest) (*Firewall, error)
	Update(fID string, fr *godo.FirewallRequest) (*Firewall, error)
	List() (Firewalls, error)
	ListByDroplet(dID int) (Firewalls, error)
	Delete(fID string) error
	AddDroplets(fID string, dIDs ...int) error
	RemoveDroplets(fID string, dIDs ...int) error
	AddTags(fID string, tags ...string) error
	RemoveTags(fID string, tags ...string) error
	AddRules(fID string, rr *godo.FirewallRulesRequest) error
	RemoveRules(fID string, rr *godo.FirewallRulesRequest) error
}

FirewallsService is the godo FirewallsService interface.

func NewFirewallsService added in v1.7.0

func NewFirewallsService(client *godo.Client) FirewallsService

NewFirewallsService builds an instance of FirewallsService.

type FunctionParameter added in v1.80.0

type FunctionParameter struct {
	Key        string `json:"key"`
	Value      string `json:"value"`
	Init       bool   `json:"init"`
	Encryption string `json:"encryption"`
}

FunctionParameter is the type of a parameter in the response body of action.get. We do our own JSON unmarshalling of these because the go OpenWhisk client doesn't include the "init" and "encryption" members, of which at least "init" is needed.

type FunctionParameterReparse added in v1.80.0

type FunctionParameterReparse struct {
	Parameters []FunctionParameter `json:"parameters"`
}

FunctionParameterReparse is a partial remapping of whisk.Action so that the parameters are declared as FunctionParameter rather than whisk.KeyValue.

type FunctionRoute added in v1.134.0

type FunctionRoute struct {
	*godo.AgentFunction
}

type FunctionRoutes added in v1.134.0

type FunctionRoutes []FunctionRoute

type GarbageCollection added in v1.50.0

type GarbageCollection struct {
	*godo.GarbageCollection
}

GarbageCollection wraps a godo GarbageCollection

type GenAIService added in v1.131.0

type GenAIService interface {
	ListAgents() (Agents, error)
	CreateAgent(req *godo.AgentCreateRequest) (*Agent, error)
	GetAgent(agentID string) (*Agent, error)
	UpdateAgent(agentID string, req *godo.AgentUpdateRequest) (*Agent, error)
	DeleteAgent(agentID string) error
	UpdateAgentVisibility(agentID string, req *godo.AgentVisibilityUpdateRequest) (*Agent, error)
	ListKnowledgeBases() (KnowledgeBases, error)
	GetKnowledgeBase(knowledgeBaseID string) (*KnowledgeBase, error)
	CreateKnowledgeBase(req *godo.KnowledgeBaseCreateRequest) (*KnowledgeBase, error)
	UpdateKnowledgeBase(knowledgeBaseID string, req *godo.UpdateKnowledgeBaseRequest) (*KnowledgeBase, error)
	DeleteKnowledgeBase(knowledgeBaseID string) error
	AddKnowledgeBaseDataSource(knowledgeBaseID string, req *godo.AddKnowledgeBaseDataSourceRequest) (*KnowledgeBaseDataSource, error)
	ListKnowledgeBaseDataSources(knowledgeBaseID string) (KnowledgeBaseDataSources, error)
	DeleteKnowledgeBaseDataSource(knowledgeBaseID string, dataSourceID string) error
	AttachKnowledgeBaseToAgent(agentId string, knowledgeBaseID string) (*Agent, error)
	DetachKnowledgeBaseToAgent(agentId string, knowledgeBaseID string) (*Agent, error)
	AddAgentRoute(parentAgentID string, childAgentID string) (*AgentRouteResponse, error)
	UpdateAgentRoute(parentAgentID string, childAgentID string, req *godo.AgentRouteUpdateRequest) (*AgentRouteResponse, error)
	DeleteAgentRoute(parentAgentID string, childAgentID string) error
	CreateFunctionRoute(id string, req *godo.FunctionRouteCreateRequest) (*Agent, error)
	DeleteFunctionRoute(agent_id string, function_id string) (*Agent, error)
	UpdateFunctionRoute(agent_id string, function_id string, req *godo.FunctionRouteUpdateRequest) (*Agent, error)
	ListAgentVersions(agentID string) (AgentVersions, error)
	ListAgentAPIKeys(agentId string) (ApiKeys, error)
	CreateAgentAPIKey(agentID string, req *godo.AgentAPIKeyCreateRequest) (*ApiKeyInfo, error)
	UpdateAgentAPIKey(agentID string, apikeyID string, req *godo.AgentAPIKeyUpdateRequest) (*ApiKeyInfo, error)
	DeleteAgentAPIKey(agentID string, apikeyID string) error
	RegenerateAgentAPIKey(agentID string, apikeyID string) (*ApiKeyInfo, error)
	ListOpenAIAPIKeys() (OpenAiApiKeys, error)
	CreateOpenAIAPIKey(openaiAPIKeyCreate *godo.OpenAIAPIKeyCreateRequest) (*OpenAiApiKey, error)
	GetOpenAIAPIKey(openaiApiKeyId string) (*OpenAiApiKey, error)
	UpdateOpenAIAPIKey(openaiApiKeyId string, openaiAPIKeyUpdate *godo.OpenAIAPIKeyUpdateRequest) (*OpenAiApiKey, error)
	DeleteOpenAIAPIKey(openaiApiKeyId string) (*OpenAiApiKey, error)
	ListAgentsByOpenAIAPIKey(openaiApiKeyId string) (Agents, error)
	ListDatacenterRegions(servesInference, servesBatch *bool) (DatacenterRegions, error)
	ListAvailableModels() (Models, error)
	ListIndexingJobs() (IndexingJobs, error)
	GetIndexingJob(indexingJobID string) (*IndexingJob, error)
	CancelIndexingJob(indexingJobID string) (*IndexingJob, error)
	ListIndexingJobDataSources(indexingJobID string) (IndexingJobDataSources, error)
}

GenAIService is an interface for interacting with DigitalOcean's Agent API.

func NewGenAIService added in v1.131.0

func NewGenAIService(client *godo.Client) GenAIService

NewAgentService builds an instance of AgentService.

type Generator

type Generator func(*godo.ListOptions) ([]any, *godo.Response, error)

Generator is a function that generates the list to be paginated.

type Image

type Image struct {
	*godo.Image
}

Image is a wrapper for godo.Image

type ImageActionsService

type ImageActionsService interface {
	Get(int, int) (*Action, error)
	Convert(int) (*Action, error)
	Transfer(int, *godo.ActionRequest) (*Action, error)
}

ImageActionsService is an interface for interacting with DigitalOcean's image action api.

func NewImageActionsService

func NewImageActionsService(client *godo.Client) ImageActionsService

NewImageActionsService builds an ImageActionsService instance.

type Images

type Images []Image

Images is a slice of Image.

type ImagesService

type ImagesService interface {
	List(public bool) (Images, error)
	ListDistribution(public bool) (Images, error)
	ListApplication(public bool) (Images, error)
	ListUser(public bool) (Images, error)
	GetByID(id int) (*Image, error)
	GetBySlug(slug string) (*Image, error)
	Update(id int, iur *godo.ImageUpdateRequest) (*Image, error)
	Delete(id int) error
	Create(icr *godo.CustomImageCreateRequest) (*Image, error)
}

ImagesService is the godo ImagesService interface.

func NewImagesService

func NewImagesService(client *godo.Client) ImagesService

NewImagesService builds an instance of ImagesService.

type IndexingJob added in v1.147.0

type IndexingJob struct {
	*godo.LastIndexingJob
}

IndexingJob represents a job for indexing knowledge base content.

type IndexingJobDataSource added in v1.147.0

type IndexingJobDataSource struct {
	*godo.IndexedDataSource
}

IndexingJobDataSource represents an indexed data source within an indexing job

type IndexingJobDataSources added in v1.147.0

type IndexingJobDataSources []IndexingJobDataSource

IndexingJobDataSources is a slice of IndexingJobDataSource

type IndexingJobs added in v1.147.0

type IndexingJobs []IndexingJob

IndexingJobs is a slice of IndexingJob

type InterfaceType

type InterfaceType string

InterfaceType is an interface type.

const (
	// InterfacePublic is a public interface.
	InterfacePublic InterfaceType = "public"
	// InterfacePrivate is a private interface.
	InterfacePrivate InterfaceType = "private"
)

type Invoice added in v1.39.0

type Invoice struct {
	*godo.Invoice
}

Invoice is a wrapper for godo.Invoice

type InvoiceItem added in v1.39.0

type InvoiceItem struct {
	*godo.InvoiceItem
}

InvoiceItem is a wrapper for godo.InvoiceItem

type InvoiceList added in v1.39.0

type InvoiceList struct {
	*godo.InvoiceList
}

InvoiceList is the results when listing invoices

type InvoiceSummary added in v1.39.0

type InvoiceSummary struct {
	*godo.InvoiceSummary
}

InvoiceSummary is a wrapper for godo.InvoiceSummary

type InvoicesService added in v1.39.0

type InvoicesService interface {
	Get(string) (*Invoice, error)
	List() (*InvoiceList, error)
	GetSummary(string) (*InvoiceSummary, error)
	GetPDF(string) ([]byte, error)
	GetCSV(string) ([]byte, error)
}

InvoicesService is an interface for interacting with DigitalOcean's invoices api.

func NewInvoicesService added in v1.39.0

func NewInvoicesService(client *godo.Client) InvoicesService

NewInvoicesService builds an InvoicesService instance.

type KafkaConfig added in v1.115.0

type KafkaConfig struct {
	*godo.KafkaConfig
}

KafkaConfig is a wrapper for godo.KafkaConfig

type Kernel

type Kernel struct {
	*godo.Kernel
}

Kernel is a wrapper for godo.Kernel

type Kernels

type Kernels []Kernel

Kernels is a slice of Kernel.

type KeysService

type KeysService interface {
	List() (SSHKeys, error)
	Get(id string) (*SSHKey, error)
	Create(kcr *godo.KeyCreateRequest) (*SSHKey, error)
	Update(id string, kur *godo.KeyUpdateRequest) (*SSHKey, error)
	Delete(id string) error
}

KeysService is the godo KeysService interface.

func NewKeysService

func NewKeysService(client *godo.Client) KeysService

NewKeysService builds an instance of KeysService.

type KnowledgeBase added in v1.133.0

type KnowledgeBase struct {
	*godo.KnowledgeBase
}

type KnowledgeBaseDataSource added in v1.133.0

type KnowledgeBaseDataSource struct {
	*godo.KnowledgeBaseDataSource
}

type KnowledgeBaseDataSources added in v1.133.0

type KnowledgeBaseDataSources []KnowledgeBaseDataSource

KnowledgeBase DataSources for Agents

type KnowledgeBases added in v1.133.0

type KnowledgeBases []KnowledgeBase

KnowledgeBases for Agents

type KubernetesAssociatedResources added in v1.56.0

type KubernetesAssociatedResources struct {
	*godo.KubernetesAssociatedResources
}

KubernetesAssociatedResources wraps a godo KubernetesAssociatedResources

type KubernetesCluster added in v1.12.0

type KubernetesCluster struct {
	*godo.KubernetesCluster
}

KubernetesCluster wraps a godo KubernetesCluster.

type KubernetesClusterCredentials added in v1.32.2

type KubernetesClusterCredentials struct {
	*godo.KubernetesClusterCredentials
}

KubernetesClusterCredentials wraps a godo KubernetesClusterCredentials.

type KubernetesClusters added in v1.12.0

type KubernetesClusters []KubernetesCluster

KubernetesClusters is a slice of KubernetesCluster.

type KubernetesNodePool added in v1.12.0

type KubernetesNodePool struct {
	*godo.KubernetesNodePool
}

KubernetesNodePool wraps a godo KubernetesNodePool.

type KubernetesNodePools added in v1.12.0

type KubernetesNodePools []KubernetesNodePool

KubernetesNodePools is a slice of KubernetesNodePool.

type KubernetesNodeSize added in v1.12.1

type KubernetesNodeSize struct {
	*godo.KubernetesNodeSize
}

KubernetesNodeSize wraps a godo KubernetesNodeSize.

type KubernetesNodeSizes added in v1.12.1

type KubernetesNodeSizes []KubernetesNodeSize

KubernetesNodeSizes is a slice of KubernetesNodeSizes.

type KubernetesRegion added in v1.12.1

type KubernetesRegion struct {
	*godo.KubernetesRegion
}

KubernetesRegion wraps a godo KubernetesRegion.

type KubernetesRegions added in v1.12.1

type KubernetesRegions []KubernetesRegion

KubernetesRegions is a slice of KubernetesRegions.

type KubernetesService added in v1.12.0

type KubernetesService interface {
	Get(clusterID string) (*KubernetesCluster, error)
	GetKubeConfig(clusterID string) ([]byte, error)
	GetKubeConfigWithExpiry(clusterID string, expirySeconds int64) ([]byte, error)
	GetCredentials(clusterID string) (*KubernetesClusterCredentials, error)
	GetUpgrades(clusterID string) (KubernetesVersions, error)
	List() (KubernetesClusters, error)
	ListAssociatedResourcesForDeletion(clusterID string) (*KubernetesAssociatedResources, error)
	Create(create *godo.KubernetesClusterCreateRequest) (*KubernetesCluster, error)
	Update(clusterID string, update *godo.KubernetesClusterUpdateRequest) (*KubernetesCluster, error)
	Upgrade(clusterID string, versionSlug string) error
	Delete(clusterID string) error
	DeleteDangerous(clusterID string) error
	DeleteSelective(clusterID string, deleteReq *godo.KubernetesClusterDeleteSelectiveRequest) error

	CreateNodePool(clusterID string, req *godo.KubernetesNodePoolCreateRequest) (*KubernetesNodePool, error)
	GetNodePool(clusterID, poolID string) (*KubernetesNodePool, error)
	ListNodePools(clusterID string) (KubernetesNodePools, error)
	UpdateNodePool(clusterID, poolID string, req *godo.KubernetesNodePoolUpdateRequest) (*KubernetesNodePool, error)
	// RecycleNodePoolNodes is DEPRECATED please use DeleteNode
	RecycleNodePoolNodes(clusterID, poolID string, req *godo.KubernetesNodePoolRecycleNodesRequest) error
	DeleteNodePool(clusterID, poolID string) error
	DeleteNode(clusterID, poolID, nodeID string, req *godo.KubernetesNodeDeleteRequest) error

	GetVersions() (KubernetesVersions, error)
	GetRegions() (KubernetesRegions, error)
	GetNodeSizes() (KubernetesNodeSizes, error)
	AddRegistry(req *godo.KubernetesClusterRegistryRequest) error
	RemoveRegistry(req *godo.KubernetesClusterRegistryRequest) error
}

KubernetesService is the godo KubernetesService interface.

func NewKubernetesService added in v1.12.0

func NewKubernetesService(client *godo.Client) KubernetesService

NewKubernetesService builds an instance of KubernetesService.

type KubernetesVersion added in v1.12.0

type KubernetesVersion struct {
	*godo.KubernetesVersion
}

KubernetesVersion wraps a godo KubernetesVersion.

type KubernetesVersions added in v1.12.0

type KubernetesVersions []KubernetesVersion

KubernetesVersions is a slice of KubernetesVersions.

type LoadBalancer added in v1.6.0

type LoadBalancer struct {
	*godo.LoadBalancer
}

LoadBalancer wraps a godo LoadBalancer.

type LoadBalancers added in v1.6.0

type LoadBalancers []LoadBalancer

LoadBalancers is a slice of LoadBalancer.

type LoadBalancersService added in v1.6.0

type LoadBalancersService interface {
	Get(lbID string) (*LoadBalancer, error)
	List() (LoadBalancers, error)
	Create(lbr *godo.LoadBalancerRequest) (*LoadBalancer, error)
	Update(lbID string, lbr *godo.LoadBalancerRequest) (*LoadBalancer, error)
	Delete(lbID string) error
	AddDroplets(lbID string, dIDs ...int) error
	RemoveDroplets(lbID string, dIDs ...int) error
	AddForwardingRules(lbID string, rules ...godo.ForwardingRule) error
	RemoveForwardingRules(lbID string, rules ...godo.ForwardingRule) error
	PurgeCache(lbID string) error
}

LoadBalancersService is the godo LoadBalancersService interface.

func NewLoadBalancersService added in v1.6.0

func NewLoadBalancersService(client *godo.Client) LoadBalancersService

NewLoadBalancersService builds an instance of LoadBalancersService.

type Model added in v1.139.0

type Model struct {
	*godo.Model
}

Model represents an available model for GenAI services.

type Models added in v1.139.0

type Models []Model

Models is a slice of Model.

type MongoDBConfig added in v1.115.0

type MongoDBConfig struct {
	*godo.MongoDBConfig
}

MongoDBConfig is a wrapper for godo.MongoDBConfig

type MonitoringService added in v1.63.1

type MonitoringService interface {
	ListAlertPolicies() (AlertPolicies, error)
	GetAlertPolicy(string) (*AlertPolicy, error)
	CreateAlertPolicy(request *godo.AlertPolicyCreateRequest) (*AlertPolicy, error)
	UpdateAlertPolicy(uuid string, request *godo.AlertPolicyUpdateRequest) (*AlertPolicy, error)
	DeleteAlertPolicy(string) error
}

MonitoringService is an interface for interacting with DigitalOcean's monitoring api.

func NewMonitoringService added in v1.63.1

func NewMonitoringService(godoClient *godo.Client) MonitoringService

NewMonitoringService builds a MonitoringService instance.

type MySQLConfig added in v1.100.0

type MySQLConfig struct {
	*godo.MySQLConfig
}

MySQLConfig is a wrapper for godo.MySQLConfig

type NamespaceListResponse added in v1.80.0

type NamespaceListResponse struct {
	Namespaces []OutputNamespace `json:"namespaces"`
}

NamespaceListResponse is the type of the response body for /api/v2/functions/namespaces (GET)

type NamespaceResponse added in v1.80.0

type NamespaceResponse struct {
	Namespace OutputNamespace `json:"namespace"`
}

NamespaceResponse is the type of the response body for /api/v2/functions/sandbox (POST) and /api/v2/functions/namespaces/<nsName> (GET)

type Nfs added in v1.146.0

type Nfs struct {
	*godo.Nfs
}

Nfs wraps a godo.Nfs.

type NfsAction added in v1.146.0

type NfsAction struct {
	*godo.NfsAction
}

Action is a wrapper for godo.Action

type NfsActions added in v1.146.0

type NfsActions []NfsAction

NfsActions is a slice of NfsAction.

type NfsActionsService added in v1.146.0

type NfsActionsService interface {
	Resize(id string, size uint64, region string) (*NfsAction, error)
	Snapshot(id, name, region string) (*NfsAction, error)
	Attach(id, vpcID, region string) (*NfsAction, error)
	Detach(id, vpcID, region string) (*NfsAction, error)
}

NfsActionsService is an interface for interacting with DigitalOcean's NFS Actions API.

func NewNfsActionsService added in v1.146.0

func NewNfsActionsService(godoClient *godo.Client) NfsActionsService

NewNfsActionsService builds a NewNfsActionsService instance.

type NfsService added in v1.146.0

type NfsService interface {
	List(region string) ([]Nfs, error)
	Create(*godo.NfsCreateRequest) (*Nfs, error)
	Delete(id, region string) error
	Get(id, region string) (*Nfs, error)
	ListSnapshots(shareID, region string) ([]NfsSnapshot, error)
	GetSnapshot(snapshotID, region string) (*NfsSnapshot, error)
	DeleteSnapshot(snapshotID, region string) error
}

NfsService is an interface for interacting with DigitalOcean's NFS API.

func NewNfsService added in v1.146.0

func NewNfsService(godoClient *godo.Client) NfsService

NewNfsService builds a NewNfsService instance.

type NfsSnapshot added in v1.146.0

type NfsSnapshot struct {
	*godo.NfsSnapshot
}

NfsSnapshot wraps a godo.NfsSnapshot.

type OAuthApplication added in v1.91.0

type OAuthApplication struct {
	UID string `json:"uid"`
}

OAuthApplication contains info about an OAuth application

type OAuthService added in v1.91.0

type OAuthService interface {
	TokenInfo(string) (*OAuthTokenInfo, error)
}

OAuthService is an interface for interacting with DigitalOcean's account api.

func NewOAuthService added in v1.91.0

func NewOAuthService(godoClient *godo.Client) OAuthService

NewOAuthService builds an OAuthService instance.

type OAuthTokenInfo added in v1.91.0

type OAuthTokenInfo struct {
	ResourceOwnerID  int              `json:"resource_owner_id"`
	Scopes           []string         `json:"scopes"`
	ExpiresInSeconds int              `json:"expires_in_seconds"`
	Application      OAuthApplication `json:"application"`
	CreatedAt        int              `json:"created_at"`
}

OAuthTokenInfo contains information about an OAuth token

type OneClick added in v1.44.0

type OneClick struct {
	*godo.OneClick
}

OneClick represents the structure of a 1-click

type OneClickService added in v1.44.0

type OneClickService interface {
	List(string) (OneClicks, error)
	InstallKubernetes(string, []string) (string, error)
}

OneClickService is the godo OneClickService interface.

func NewOneClickService added in v1.44.0

func NewOneClickService(client *godo.Client) OneClickService

NewOneClickService builds an instance of OneClickService.

type OneClicks added in v1.44.0

type OneClicks []OneClick

OneClicks is a set of OneClick structs

type OpenAiApiKey added in v1.136.0

type OpenAiApiKey struct {
	*godo.OpenAiApiKey
}

type OpenAiApiKeys added in v1.136.0

type OpenAiApiKeys []OpenAiApiKey

OpenAiApiKeys is a slice of OpenAiApiKey.

type OpensearchConfig added in v1.116.0

type OpensearchConfig struct {
	*godo.OpensearchConfig
}

OpensearchConfig is a wrapper for godo.OpensearchConfig

type OutputNamespace added in v1.80.0

type OutputNamespace struct {
	Namespace string `json:"namespace"`
	APIHost   string `json:"api_host"`
	UUID      string `json:"uuid"`
	Key       string `json:"key"`
	Label     string `json:"label"`
	Region    string `json:"Region"`
}

OutputNamespace is the type of the "namespace" member of the response to /api/v2/functions/sandbox and /api/v2/functions/namespaces APIs. Only relevant fields unmarshalled

type PartnerAttachment added in v1.125.0

type PartnerAttachment struct {
	PartnerAttachment *godo.PartnerAttachment
}

PartnerAttachment wraps a godo PartnerAttachment.

type PartnerAttachmentBGPAuthKey added in v1.125.0

type PartnerAttachmentBGPAuthKey struct {
	*godo.BgpAuthKey
}

PartnerAttachmentBGPAuthKey wrap a godo BgpAuthKey.

type PartnerAttachmentRegenerateServiceKey added in v1.125.0

type PartnerAttachmentRegenerateServiceKey struct {
	*godo.RegenerateServiceKey
}

PartnerAttachmentRegenerateServiceKey wraps a godo RegenerateServiceKey.

type PartnerAttachmentRoute added in v1.125.0

type PartnerAttachmentRoute struct {
	*godo.RemoteRoute
}

PartnerAttachmentRoute wraps a godo RemoteRoute.

type PartnerAttachmentRoutes added in v1.125.0

type PartnerAttachmentRoutes []PartnerAttachmentRoute

PartnerAttachmentRoutes is a slice of PartnerAttachmentRoute.

type PartnerAttachmentServiceKey added in v1.125.0

type PartnerAttachmentServiceKey struct {
	*godo.ServiceKey
}

PartnerAttachmentServiceKey wraps a godo ServiceKey.

type PartnerAttachments added in v1.125.0

type PartnerAttachments []PartnerAttachment

PartnerAttachments is a slice of PartnerAttachment.

type PartnerAttachmentsService added in v1.125.0

type PartnerAttachmentsService interface {
	Create(*godo.PartnerAttachmentCreateRequest) (*PartnerAttachment, error)
	GetPartnerAttachment(paID string) (*PartnerAttachment, error)
	ListPartnerAttachments() (PartnerAttachments, error)
	DeletePartnerAttachment(paID string) error
	UpdatePartnerAttachment(paID string, req *godo.PartnerAttachmentUpdateRequest) (*PartnerAttachment, error)
	ListPartnerAttachmentRoutes(paID string) (PartnerAttachmentRoutes, error)
	GetBGPAuthKey(paID string) (*PartnerAttachmentBGPAuthKey, error)
	RegenerateServiceKey(paID string) (*PartnerAttachmentRegenerateServiceKey, error)
	GetServiceKey(paID string) (*PartnerAttachmentServiceKey, error)
}

PartnerAttachmentsService is an interface for interacting with DigitalOcean's partner attachment api.

func NewPartnerAttachmentsService added in v1.125.0

func NewPartnerAttachmentsService(client *godo.Client) PartnerAttachmentsService

NewPartnerAttachmentsService builds an instance of PartnerAttachmentsService.

type PostgreSQLConfig added in v1.100.0

type PostgreSQLConfig struct {
	*godo.PostgreSQLConfig
}

PostgreSQLConfig is a wrapper for godo.PostgreSQLConfig

type Project added in v1.11.0

type Project struct {
	*godo.Project
}

Project wraps a godo Project.

type ProjectMetadata added in v1.80.0

type ProjectMetadata struct {
	ServerlessSpec
	UnresolvedVariables []string `json:"unresolvedVariables,omitempty"`
}

ProjectMetadata describes the nim project:get-metadata output structure.

type ProjectResource added in v1.11.0

type ProjectResource struct {
	*godo.ProjectResource
}

ProjectResource wraps a godo ProjectResource

type ProjectResources added in v1.11.0

type ProjectResources []ProjectResource

ProjectResources is a slice of ProjectResource.

type Projects added in v1.11.0

type Projects []Project

Projects is a slice of Project.

type ProjectsService added in v1.11.0

type ProjectsService interface {
	List() (Projects, error)
	GetDefault() (*Project, error)
	Get(projectUUID string) (*Project, error)
	Create(*godo.CreateProjectRequest) (*Project, error)
	Update(projectUUID string, req *godo.UpdateProjectRequest) (*Project, error)
	Delete(projectUUID string) error

	ListResources(projectUUID string) (ProjectResources, error)
	AssignResources(projectUUID string, resources []string) (ProjectResources, error)
}

ProjectsService is the godo ProjectsService interface.

func NewProjectsService added in v1.11.0

func NewProjectsService(client *godo.Client) ProjectsService

NewProjectsService builds an instance of ProjectsService.

type RateLimit

type RateLimit struct {
	*godo.Rate
}

RateLimit is a wrapper for godo.Rate.

type RedisConfig added in v1.100.0

type RedisConfig struct {
	*godo.RedisConfig
}

RedisConfig is a wrapper for godo.RedisConfig

type Region

type Region struct {
	*godo.Region
}

Region wraps godo Region.

type Regions

type Regions []Region

Regions is a slice of Region.

type RegionsService

type RegionsService interface {
	List() (Regions, error)
}

RegionsService is the godo RegionsService interface.

func NewRegionsService

func NewRegionsService(client *godo.Client) RegionsService

NewRegionsService builds an instance of RegionsService.

type RegistriesService added in v1.142.0

type RegistriesService interface {
	Get(string) (*Registry, error)
	List() ([]Registry, error)
	Create(*godo.RegistryCreateRequest) (*Registry, error)
	Delete(string) error
	DockerCredentials(string, *godo.RegistryDockerCredentialsRequest) (*godo.DockerCredentials, error)
	ListRepositories(string) ([]Repository, error)
	ListRepositoriesV2(string) ([]RepositoryV2, error)
	ListRepositoryTags(string, string) ([]RepositoryTag, error)
	DeleteTag(string, string, string) error
	ListRepositoryManifests(string, string) ([]RepositoryManifest, error)
	DeleteManifest(string, string, string) error
	StartGarbageCollection(string, *godo.StartGarbageCollectionRequest) (*GarbageCollection, error)
	GetGarbageCollection(string) (*GarbageCollection, error)
	ListGarbageCollections(string) ([]GarbageCollection, error)
	UpdateGarbageCollection(string, string, *godo.UpdateGarbageCollectionRequest) (*GarbageCollection, error)
	GetOptions() (*godo.RegistryOptions, error)
	GetSubscriptionTiers() ([]RegistrySubscriptionTier, error)
	GetAvailableRegions() ([]string, error)
}

RegistriesService is the godo RegistriesService interface.

func NewRegistriesService added in v1.142.0

func NewRegistriesService(client *godo.Client) RegistriesService

NewRegistriesService builds an instance of RegistriesService.

type Registry added in v1.34.0

type Registry struct {
	*godo.Registry
}

Registry wraps a godo Registry.

func (*Registry) Endpoint added in v1.34.0

func (r *Registry) Endpoint() string

Endpoint returns the registry endpoint for image tagging

type RegistryService added in v1.34.0

type RegistryService interface {
	Get() (*Registry, error)
	Create(*godo.RegistryCreateRequest) (*Registry, error)
	Delete() error
	DockerCredentials(*godo.RegistryDockerCredentialsRequest) (*godo.DockerCredentials, error)
	ListRepositoryTags(string, string) ([]RepositoryTag, error)
	ListRepositoryManifests(string, string) ([]RepositoryManifest, error)
	ListRepositories(string) ([]Repository, error)
	ListRepositoriesV2(string) ([]RepositoryV2, error)
	DeleteTag(string, string, string) error
	DeleteManifest(string, string, string) error
	Endpoint() string
	StartGarbageCollection(string, *godo.StartGarbageCollectionRequest) (*GarbageCollection, error)
	GetGarbageCollection(string) (*GarbageCollection, error)
	ListGarbageCollections(string) ([]GarbageCollection, error)
	CancelGarbageCollection(string, string) (*GarbageCollection, error)
	GetSubscriptionTiers() ([]RegistrySubscriptionTier, error)
	GetAvailableRegions() ([]string, error)
	RevokeOAuthToken(token string, endpoint string) error
}

RegistryService is the godo RegistryService interface.

func NewRegistryService added in v1.34.0

func NewRegistryService(client *godo.Client) RegistryService

NewRegistryService builds an instance of RegistryService.

type RegistrySubscriptionTier added in v1.51.0

type RegistrySubscriptionTier struct {
	*godo.RegistrySubscriptionTier
}

RegistrySubscriptionTier wraps a godo RegistrySubscriptionTier

type Repository added in v1.42.0

type Repository struct {
	*godo.Repository
}

Repository wraps a godo Repository

type RepositoryManifest added in v1.68.0

type RepositoryManifest struct {
	*godo.RepositoryManifest
}

RepositoryManifest wraps a godo RepositoryManifest

type RepositoryTag added in v1.42.0

type RepositoryTag struct {
	*godo.RepositoryTag
}

RepositoryTag wraps a godo RepositoryTag

type RepositoryV2 added in v1.68.0

type RepositoryV2 struct {
	*godo.RepositoryV2
}

RepositoryV2 wraps a godo RepositoryV2

type ReservedIP added in v1.77.0

type ReservedIP struct {
	*godo.ReservedIP
}

ReservedIP wraps a godo ReservedIP.

type ReservedIPActionsService added in v1.77.0

type ReservedIPActionsService interface {
	Assign(ip string, dropletID int) (*Action, error)
	Unassign(ip string) (*Action, error)
	Get(ip string, actionID int) (*Action, error)
	List(ip string, opt *godo.ListOptions) ([]Action, error)
}

ReservedIPActionsService is an interface for interacting with DigitalOcean's reserved ip action api.

func NewReservedIPActionsService added in v1.77.0

func NewReservedIPActionsService(godoClient *godo.Client) ReservedIPActionsService

NewReservedIPActionsService builds a ReservedIPActionsService instance.

type ReservedIPs added in v1.77.0

type ReservedIPs []ReservedIP

ReservedIPs is a slice of ReservedIP.

type ReservedIPsService added in v1.77.0

type ReservedIPsService interface {
	List() (ReservedIPs, error)
	Get(ip string) (*ReservedIP, error)
	Create(ficr *godo.ReservedIPCreateRequest) (*ReservedIP, error)
	Delete(ip string) error
}

ReservedIPsService is the godo ReservedIPsService interface.

func NewReservedIPsService added in v1.77.0

func NewReservedIPsService(client *godo.Client) ReservedIPsService

NewReservedIPsService builds an instance of ReservedIPsService.

type ReservedIPv6 added in v1.120.0

type ReservedIPv6 struct {
	*godo.ReservedIPV6
}

ReservedIP wraps a godo ReservedIP.

type ReservedIPv6s added in v1.120.0

type ReservedIPv6s []ReservedIPv6

ReservedIPv6s is a slice of ReservedIPv6.

type ReservedIPv6sService added in v1.120.0

type ReservedIPv6sService interface {
	List() (ReservedIPv6s, error)
	Get(ip string) (*ReservedIPv6, error)
	Create(ficr *godo.ReservedIPV6CreateRequest) (*ReservedIPv6, error)
	Delete(ip string) error

	Assign(ip string, dropletID int) (*Action, error)
	Unassign(ip string) (*Action, error)
}

ReservedIPv6sService is the godo ReservedIPv6sService interface.

func NewReservedIPv6sService added in v1.120.0

func NewReservedIPv6sService(client *godo.Client) ReservedIPv6sService

NewReservedIPsService builds an instance of ReservedIPsService.

type SSHKey

type SSHKey struct {
	*godo.Key
}

SSHKey wraps godo Key.

type SSHKeys

type SSHKeys []SSHKey

SSHKeys is a slice of SSHKey

type ServerlessCredential added in v1.80.0

type ServerlessCredential struct {
	Auth string `json:"api_key"`
}

ServerlessCredential is the type of an individual entry in ServerlessCredentials

type ServerlessCredentials added in v1.80.0

type ServerlessCredentials struct {
	APIHost     string                                     `json:"currentHost"`
	Namespace   string                                     `json:"currentNamespace"`
	Label       string                                     `json:"label"`
	Credentials map[string]map[string]ServerlessCredential `json:"credentials"`
}

ServerlessCredentials models what is stored in credentials.json for use by the plugin and nim. It is also the type returned by the GetServerlessNamespace function.

type ServerlessFunction added in v1.85.0

type ServerlessFunction struct {
	Name    string `json:"name,omitempty"`
	Binary  bool   `json:"binary,omitempty"`
	Main    string `json:"main,omitempty"`
	Runtime string `json:"runtime,omitempty"`
	// `web` can be either true or "raw". We use interface{} to support both types. If we start consuming the value we
	// should probably define a custom type with proper validation.
	Web         any            `json:"web,omitempty"`
	WebSecure   any            `json:"webSecure,omitempty" yaml:"webSecure"`
	Parameters  map[string]any `json:"parameters,omitempty"`
	Environment map[string]any `json:"environment,omitempty"`
	Annotations map[string]any `json:"annotations,omitempty"`
	Limits      map[string]int `json:"limits,omitempty"`
}

ServerlessFunction ...

type ServerlessHostInfo added in v1.75.0

type ServerlessHostInfo struct {
	Runtimes map[string][]ServerlessRuntime `json:"runtimes"`
}

ServerlessHostInfo is the type of the host information return from the API host controller of the serverless cluster. Only relevant fields unmarshaled.

type ServerlessOutput added in v1.80.0

type ServerlessOutput struct {
	Table     []map[string]any `json:"table,omitempty"`
	Captured  []string         `json:"captured,omitempty"`
	Formatted []string         `json:"formatted,omitempty"`
	Entity    any              `json:"entity,omitempty"`
	Error     string           `json:"error,omitempty"`
}

ServerlessOutput contains the output returned from calls to the sandbox plugin.

type ServerlessPackage added in v1.85.0

type ServerlessPackage struct {
	Name        string                `json:"name,omitempty"`
	Shared      bool                  `json:"shared,omitempty"`
	Environment map[string]any        `json:"environment,omitempty"`
	Parameters  map[string]any        `json:"parameters,omitempty"`
	Annotations map[string]any        `json:"annotations,omitempty"`
	Functions   []*ServerlessFunction `json:"functions,omitempty"`
}

ServerlessPackage ...

type ServerlessProject added in v1.80.0

type ServerlessProject struct {
	ProjectPath string   `json:"project_path"`
	ConfigPath  string   `json:"config"`
	Packages    string   `json:"packages"`
	Env         string   `json:"env"`
	Strays      []string `json:"strays"`
}

ServerlessProject ...

type ServerlessRuntime added in v1.75.0

type ServerlessRuntime struct {
	Default    bool   `json:"default"`
	Deprecated bool   `json:"deprecated"`
	Kind       string `json:"kind"`
}

ServerlessRuntime is the type of a runtime entry returned by the API host controller of the serverless cluster. Only relevant fields unmarshalled

type ServerlessService added in v1.80.0

type ServerlessService interface {
	Cmd(string, []string) (*exec.Cmd, error)
	Exec(*exec.Cmd) (ServerlessOutput, error)
	Stream(*exec.Cmd) error
	GetServerlessNamespace(context.Context) (ServerlessCredentials, error)
	ListNamespaces(context.Context) (NamespaceListResponse, error)
	GetNamespace(context.Context, string) (ServerlessCredentials, error)
	GetNamespaceFromCluster(string, string) (string, error)
	CreateNamespace(context.Context, string, string) (ServerlessCredentials, error)
	DeleteNamespace(context.Context, string) error
	CleanNamespace() error
	ListTriggers(context.Context, string) ([]ServerlessTrigger, error)
	GetTrigger(context.Context, string) (ServerlessTrigger, error)
	UpdateTrigger(context.Context, string, *UpdateTriggerRequest) (ServerlessTrigger, error)
	DeleteTrigger(context.Context, string) error
	WriteCredentials(ServerlessCredentials) error
	ReadCredentials() (ServerlessCredentials, error)
	GetHostInfo(string) (ServerlessHostInfo, error)
	CheckServerlessStatus() error
	InstallServerless(string, bool) error
	ListPackages() ([]whisk.Package, error)
	DeletePackage(string, bool) error
	GetFunction(string, bool) (whisk.Action, []FunctionParameter, error)
	ListFunctions(string, int, int) ([]whisk.Action, error)
	DeleteFunction(string, bool) error
	InvokeFunction(string, any, bool, bool) (any, error)
	InvokeFunctionViaWeb(string, any) error
	ListActivations(whisk.ActivationListOptions) ([]whisk.Activation, error)
	GetActivationCount(whisk.ActivationCountOptions) (whisk.ActivationCount, error)
	GetActivation(string) (whisk.Activation, error)
	GetActivationLogs(string) (whisk.Activation, error)
	GetActivationResult(string) (whisk.Response, error)
	GetConnectedAPIHost() (string, error)
	ReadProject(*ServerlessProject, []string) (ServerlessOutput, error)
	WriteProject(ServerlessProject) (string, error)
	SetEffectiveCredentials(auth string, apihost string)
	CredentialsPath() string
}

ServerlessService is an interface for interacting with the sandbox plugin, with the namespaces service, and with the serverless cluster controller.

func NewServerlessService added in v1.80.0

func NewServerlessService(client *godo.Client, usualServerlessDir string, accessToken string) ServerlessService

NewServerlessService returns a configured ServerlessService.

type ServerlessSpec added in v1.85.0

type ServerlessSpec struct {
	Parameters  map[string]any       `json:"parameters,omitempty"`
	Environment map[string]any       `json:"environment,omitempty"`
	Packages    []*ServerlessPackage `json:"packages,omitempty"`
}

ServerlessSpec describes a project.yml spec reference: https://docs.nimbella.com/configuration/

type ServerlessTrigger added in v1.82.0

type ServerlessTrigger struct {
	Namespace        string                   `json:"namespace,omitempty"`
	Function         string                   `json:"function,omitempty"`
	Type             string                   `json:"type,omitempty"`
	Name             string                   `json:"name,omitempty"`
	IsEnabled        bool                     `json:"is_enabled"`
	CreatedAt        time.Time                `json:"created_at,omitempty"`
	UpdatedAt        time.Time                `json:"updated_at,omitempty"`
	ScheduledDetails *TriggerScheduledDetails `json:"scheduled_details,omitempty"`
	ScheduledRuns    *TriggerScheduledRuns    `json:"scheduled_runs,omitempty"`
}

ServerlessTrigger is the form used in list and get responses by the triggers API

type ServerlessTriggerGetResponse added in v1.82.0

type ServerlessTriggerGetResponse struct {
	Trigger ServerlessTrigger `json:"Trigger,omitempty"`
}

ServerlessTriggerGetResponse is the form returned by the get trigger API

type ServerlessTriggerListResponse added in v1.82.0

type ServerlessTriggerListResponse struct {
	Triggers []ServerlessTrigger `json:"Triggers,omitempty"`
}

ServerlessTriggerListResponse is the form returned by the list triggers API

type Size

type Size struct {
	*godo.Size
}

Size wraps godo Size.

type Sizes

type Sizes []Size

Sizes is a slice of Size.

type SizesService

type SizesService interface {
	List() (Sizes, error)
}

SizesService is the godo SizesService interface.

func NewSizesService

func NewSizesService(client *godo.Client) SizesService

NewSizesService builds an instance of SizesService.

type Snapshot added in v1.6.0

type Snapshot struct {
	*godo.Snapshot
}

Snapshot is a wrapper for godo.Snapshot

type Snapshots added in v1.6.0

type Snapshots []Snapshot

Snapshots is a slice of Snapshot.

type SnapshotsService added in v1.6.0

type SnapshotsService interface {
	List() (Snapshots, error)
	ListVolume() (Snapshots, error)
	ListVolumeSnapshotByRegion(region string) (Snapshots, error)
	ListDroplet() (Snapshots, error)
	Get(string) (*Snapshot, error)
	Delete(string) error
}

SnapshotsService is an interface for interacting with DigitalOcean's snapshot api.

func NewSnapshotsService added in v1.6.0

func NewSnapshotsService(client *godo.Client) SnapshotsService

NewSnapshotsService builds a SnapshotsService instance.

type SpacesKey added in v1.124.0

type SpacesKey struct {
	*godo.SpacesKey
}

SpacesKey wraps a godo SpacesKey.

func (*SpacesKey) GrantString added in v1.124.0

func (s *SpacesKey) GrantString() string

GrantString returns a string representation of the grants.

type SpacesKeysService added in v1.124.0

type SpacesKeysService interface {
	Create(*godo.SpacesKeyCreateRequest) (*SpacesKey, error)
	Delete(string) error
	Update(string, *godo.SpacesKeyUpdateRequest) (*SpacesKey, error)
	List() ([]SpacesKey, error)
	Get(string) (*SpacesKey, error)
}

SpacesKeysService is an interface for interfacing with the Spaces Keys

func NewSpacesKeysService added in v1.124.0

func NewSpacesKeysService(client *godo.Client) SpacesKeysService

NewSpacesKeysService returns a new instance of SpacesKeysService.

type Tag added in v1.1.0

type Tag struct {
	*godo.Tag
}

Tag is a wrapper for godo.Tag

type Tags added in v1.1.0

type Tags []Tag

Tags is a slice of Tag.

type TagsService added in v1.1.0

type TagsService interface {
	List() (Tags, error)
	Get(string) (*Tag, error)
	Create(*godo.TagCreateRequest) (*Tag, error)
	Delete(string) error
	TagResources(string, *godo.TagResourcesRequest) error
	UntagResources(string, *godo.UntagResourcesRequest) error
}

TagsService is an interface for interacting with DigitalOcean's tags api.

func NewTagsService added in v1.1.0

func NewTagsService(godoClient *godo.Client) TagsService

NewTagsService builds a TagsService instance.

type TriggerScheduledDetails added in v1.86.0

type TriggerScheduledDetails struct {
	Cron string         `json:"cron,omitempty"`
	Body map[string]any `json:"body,omitempty"`
}

type TriggerScheduledRuns added in v1.86.0

type TriggerScheduledRuns struct {
	LastRunAt *time.Time `json:"last_run_at,omitempty"`
	NextRunAt *time.Time `json:"next_run_at,omitempty"`
}

type UpdateTriggerRequest added in v1.89.0

type UpdateTriggerRequest struct {
	IsEnabled        bool                     `json:"is_enabled"`
	ScheduledDetails *TriggerScheduledDetails `json:"scheduled_details,omitempty"`
}

type UptimeAlert added in v1.100.0

type UptimeAlert struct {
	*godo.UptimeAlert
}

UptimeAlert is a wrapper for godo.UptimeAlert.

type UptimeCheck added in v1.97.0

type UptimeCheck struct {
	*godo.UptimeCheck
}

UptimeCheck is a wrapper for godo.UptimeCheck.

type UptimeCheckState added in v1.97.0

type UptimeCheckState struct {
	*godo.UptimeCheckState
}

UptimeCheckState is a wrapper for godo.UptimeCheckState.

type UptimeChecksService added in v1.97.0

type UptimeChecksService interface {
	Create(*godo.CreateUptimeCheckRequest) (*UptimeCheck, error)
	List() ([]UptimeCheck, error)
	Get(string) (*UptimeCheck, error)
	GetState(string) (*UptimeCheckState, error)
	Update(string, *godo.UpdateUptimeCheckRequest) (*UptimeCheck, error)
	Delete(string) error
	CreateAlert(string, *godo.CreateUptimeAlertRequest) (*UptimeAlert, error)
	ListAlerts(string) ([]UptimeAlert, error)
	GetAlert(string, string) (*UptimeAlert, error)
	UpdateAlert(string, string, *godo.UpdateUptimeAlertRequest) (*UptimeAlert, error)
	DeleteAlert(string, string) error
}

UptimeChecksService is an interface for interacting with DigitalOcean's uptime check api.

func NewUptimeChecksService added in v1.97.0

func NewUptimeChecksService(godoClient *godo.Client) UptimeChecksService

NewUptimeChecksService builds an NewUptimeChecksService instance.

type VPC added in v1.40.0

type VPC struct {
	*godo.VPC
}

VPC wraps a godo VPC.

type VPCNATGatewayService added in v1.131.0

type VPCNATGatewayService struct {
	// contains filtered or unexported fields
}

func (*VPCNATGatewayService) Create added in v1.131.0

Create creates a new VPC NAT Gateway

func (*VPCNATGatewayService) Delete added in v1.131.0

func (e *VPCNATGatewayService) Delete(gatewayID string) error

Delete deletes an existing VPC NAT Gateway

func (*VPCNATGatewayService) Get added in v1.131.0

func (e *VPCNATGatewayService) Get(gatewayID string) (*godo.VPCNATGateway, error)

Get retrieves an existing VPC NAT Gateway

func (*VPCNATGatewayService) List added in v1.131.0

func (e *VPCNATGatewayService) List() ([]*godo.VPCNATGateway, error)

List lists all existing VPC NAT Gateways

func (*VPCNATGatewayService) Update added in v1.131.0

func (e *VPCNATGatewayService) Update(gatewayID string, updateReq *godo.VPCNATGatewayRequest) (*godo.VPCNATGateway, error)

Update updates an existing VPC NAT Gateway

type VPCNATGatewaysService added in v1.131.0

type VPCNATGatewaysService interface {
	Create(*godo.VPCNATGatewayRequest) (*godo.VPCNATGateway, error)
	Get(string) (*godo.VPCNATGateway, error)
	List() ([]*godo.VPCNATGateway, error)
	Update(string, *godo.VPCNATGatewayRequest) (*godo.VPCNATGateway, error)
	Delete(string) error
}

func NewVPCNATGatewaysService added in v1.131.0

func NewVPCNATGatewaysService(client *godo.Client) VPCNATGatewaysService

type VPCPeering added in v1.107.0

type VPCPeering struct {
	*godo.VPCPeering
}

VPCPeering wraps a godo VPCPeering

type VPCPeerings added in v1.107.0

type VPCPeerings []VPCPeering

VPCPeerings is a slice of VPCPeering

type VPCs added in v1.40.0

type VPCs []VPC

VPCs is a slice of VPC.

type VPCsService added in v1.40.0

type VPCsService interface {
	Get(vpcUUID string) (*VPC, error)
	List() (VPCs, error)
	Create(vpcr *godo.VPCCreateRequest) (*VPC, error)
	Update(vpcUUID string, vpcr *godo.VPCUpdateRequest) (*VPC, error)
	PartialUpdate(vpcUUID string, options ...godo.VPCSetField) (*VPC, error)
	Delete(vpcUUID string) error
	GetPeering(peeringID string) (*VPCPeering, error)
	ListVPCPeerings() (VPCPeerings, error)
	CreateVPCPeering(req *godo.VPCPeeringCreateRequest) (*VPCPeering, error)
	UpdateVPCPeering(peeringID string, req *godo.VPCPeeringUpdateRequest) (*VPCPeering, error)
	DeleteVPCPeering(peeringID string) error
	ListVPCPeeringsByVPCID(vpcID string) (VPCPeerings, error)
}

VPCsService is the godo VPCsService interface.

func NewVPCsService added in v1.40.0

func NewVPCsService(client *godo.Client) VPCsService

NewVPCsService builds an instance of VPCsService.

type ValkeyConfig added in v1.136.0

type ValkeyConfig struct {
	*godo.ValkeyConfig
}

ValkeyConfig is a wrapper for godo.ValkeyConfig

type Volume added in v1.3.0

type Volume struct {
	*godo.Volume
}

Volume is a wrapper for godo.Volume.

type VolumeActionsService added in v1.3.0

type VolumeActionsService interface {
	Attach(string, int) (*Action, error)
	Detach(string, int) (*Action, error)
	Get(string, int) (*Action, error)
	List(string) ([]Action, error)
	Resize(string, int, string) (*Action, error)
}

VolumeActionsService is an interface for interacting with DigitalOcean's volume-action api.

func NewVolumeActionsService added in v1.3.0

func NewVolumeActionsService(godoClient *godo.Client) VolumeActionsService

NewVolumeActionsService builds an VolumeActionsService instance.

type VolumesService added in v1.3.0

type VolumesService interface {
	List() ([]Volume, error)
	CreateVolume(*godo.VolumeCreateRequest) (*Volume, error)
	DeleteVolume(string) error
	Get(string) (*Volume, error)
	CreateSnapshot(*godo.SnapshotCreateRequest) (*Snapshot, error)
	GetSnapshot(string) (*Snapshot, error)
	DeleteSnapshot(string) error
	ListSnapshots(string, *godo.ListOptions) ([]Snapshot, error)
}

VolumesService is an interface for interacting with DigitalOcean's volume api.

func NewVolumesService added in v1.3.0

func NewVolumesService(godoClient *godo.Client) VolumesService

NewVolumesService builds an NewVolumesService instance.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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