oxide

package module
v0.0.7-rc.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 12 Imported by: 0

README

oxide.go

The Golang API client for Oxide.

Generating

You can trigger a build with the GitHub action to generate the client. This will automatically update the client to the latest version based on the spec at spec.json.

Alternatively, if you wish to generate the client locally, run:

$ make generate

Contributing

Please do not change the code directly since it is generated. PRs that change the code directly will be automatically closed by a bot.

Documentation

Index

Constants

View Source
const HostEnvVar = "OXIDE_HOST"

HostEnvVar is the environment variable that contains the host.

View Source
const TokenEnvVar = "OXIDE_TOKEN"

TokenEnvVar is the environment variable that contains the token.

Variables

DatumTypes is the collection of all DatumType values.

DiskStateStates is the collection of all DiskStateState values.

FieldSources is the collection of all FieldSource values.

FieldTypes is the collection of all FieldType values.

FirewallRuleActions is the collection of all FirewallRuleAction values.

FirewallRuleDirections is the collection of all FirewallRuleDirection values.

FirewallRuleHostFilterTypes is the collection of all FirewallRuleHostFilterType values.

FirewallRuleProtocols is the collection of all FirewallRuleProtocol values.

FirewallRuleStatuses is the collection of all FirewallRuleStatus values.

FirewallRuleTargetTypes is the collection of all FirewallRuleTargetType values.

View Source
var IdSortModes = []IdSortMode{
	IdSortModeIdAscending,
}

IdSortModes is the collection of all IdSortMode values.

InstanceStates is the collection of all InstanceState values.

NameOrIdSortModes is the collection of all NameOrIdSortMode values.

NameSortModes is the collection of all NameSortMode values.

RouteDestinationTypes is the collection of all RouteDestinationType values.

RouteTargetTypes is the collection of all RouteTargetType values.

RouterKinds is the collection of all RouterKind values.

RouterRouteKinds is the collection of all RouterRouteKind values.

SagaErrorInfoErrors is the collection of all SagaErrorInfoError values.

SagaStateStates is the collection of all SagaStateState values.

Functions

This section is empty.

Types

type ByteCount

type ByteCount int

ByteCount is a count of bytes, typically used either for memory or storage capacity

The maximum supported byte count is [`i64::MAX`]. This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX). We provide all of these for consumers' convenience.

type Client

type Client struct {
	Racks         *RacksService
	Sleds         *SledsService
	Organizations *OrganizationsService
	Disks         *DisksService
	Projects      *ProjectsService
	Users         *UsersService
	Roles         *RolesService
	Instances     *InstancesService
	Sagas         *SagasService
	Metrics       *MetricsService
	Vpcs          *VpcsService
	Subnets       *SubnetsService
	Firewall      *FirewallService
	Routers       *RoutersService
	Routes        *RoutesService
	Hidden        *HiddenService
	// contains filtered or unexported fields
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(token, userAgent, host string) (*Client, error)

NewClient creates a new client for the Oxide API. You need to pass in your API token to create the client.

func NewClientFromEnv

func NewClientFromEnv(userAgent string) (*Client, error)

NewClientFromEnv creates a new client for the Oxide API, using the token stored in the environment variable `OXIDE_TOKEN` and the host stored in the environment variable `OXIDE_HOST`.

func (*Client) WithToken

func (c *Client) WithToken(token string)

WithToken overrides the token used for authentication.

type DatumType

type DatumType string

DatumType is the type of an individual datum of a metric.

const (
	// DatumTypeBool represents the DatumType `"Bool"`.
	DatumTypeBool DatumType = "Bool"
	// DatumTypeI64 represents the DatumType `"I64"`.
	DatumTypeI64 DatumType = "I64"
	// DatumTypeF64 represents the DatumType `"F64"`.
	DatumTypeF64 DatumType = "F64"
	// DatumTypeString represents the DatumType `"String"`.
	DatumTypeString DatumType = "String"
	// DatumTypeBytes represents the DatumType `"Bytes"`.
	DatumTypeBytes DatumType = "Bytes"
	// DatumTypeCumulativeI64 represents the DatumType `"CumulativeI64"`.
	DatumTypeCumulativeI64 DatumType = "CumulativeI64"
	// DatumTypeCumulativeF64 represents the DatumType `"CumulativeF64"`.
	DatumTypeCumulativeF64 DatumType = "CumulativeF64"
	// DatumTypeHistogramI64 represents the DatumType `"HistogramI64"`.
	DatumTypeHistogramI64 DatumType = "HistogramI64"
	// DatumTypeHistogramF64 represents the DatumType `"HistogramF64"`.
	DatumTypeHistogramF64 DatumType = "HistogramF64"
)

type Disk

type Disk struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	DevicePath  string `json:"device_path,omitempty" yaml:"device_path,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name      Name   `json:"name,omitempty" yaml:"name,omitempty"`
	ProjectID string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
	// Size is a count of bytes, typically used either for memory or storage capacity
	//
	// The maximum supported byte count is [`i64::MAX`].  This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX).  We provide all of these for consumers' convenience.
	Size       ByteCount `json:"size,omitempty" yaml:"size,omitempty"`
	SnapshotID string    `json:"snapshot_id,omitempty" yaml:"snapshot_id,omitempty"`
	// State is state of a Disk (primarily: attached or not)
	State DiskState `json:"state,omitempty" yaml:"state,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

Disk is client view of an [`Disk`]

type DiskCreate

type DiskCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// Size is size of the Disk
	Size ByteCount `json:"size,omitempty" yaml:"size,omitempty"`
	// SnapshotID is id for snapshot from which the Disk should be created, if any
	SnapshotID string `json:"snapshot_id,omitempty" yaml:"snapshot_id,omitempty"`
}

DiskCreate is create-time parameters for a [`Disk`]

type DiskIdentifier

type DiskIdentifier struct {
	// Disk is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Disk Name `json:"disk,omitempty" yaml:"disk,omitempty"`
}

DiskIdentifier is parameters for the [`Disk`] to be attached or detached to an instance

type DiskResultsPage

type DiskResultsPage struct {
	// Items is list of items on this page of results
	Items []Disk `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

DiskResultsPage is a single page of results

type DiskState

type DiskState struct {
	State    string `json:"state,omitempty" yaml:"state,omitempty"`
	Instance string `json:"instance,omitempty" yaml:"instance,omitempty"`
}

DiskState is state of a Disk (primarily: attached or not)

type DiskStateAttached

type DiskStateAttached struct {
	Instance string         `json:"instance,omitempty" yaml:"instance,omitempty"`
	State    DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateAttached is disk is attached to the given Instance

type DiskStateAttaching

type DiskStateAttaching struct {
	Instance string         `json:"instance,omitempty" yaml:"instance,omitempty"`
	State    DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateAttaching is disk is being attached to the given Instance

type DiskStateCreating

type DiskStateCreating struct {
	State DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateCreating is disk is being initialized

type DiskStateDestroyed

type DiskStateDestroyed struct {
	State DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateDestroyed is disk has been destroyed

type DiskStateDetached

type DiskStateDetached struct {
	State DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateDetached is disk is ready but detached from any Instance

type DiskStateDetaching

type DiskStateDetaching struct {
	Instance string         `json:"instance,omitempty" yaml:"instance,omitempty"`
	State    DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateDetaching is disk is being detached from the given Instance

type DiskStateFaulted

type DiskStateFaulted struct {
	State DiskStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

DiskStateFaulted is disk is unavailable

type DiskStateState

type DiskStateState string

DiskStateState is the type definition for a DiskStateState.

const (
	// DiskStateStateAttached represents the DiskStateState `"attached"`.
	DiskStateStateAttached DiskStateState = "attached"
)
const (
	// DiskStateStateAttaching represents the DiskStateState `"attaching"`.
	DiskStateStateAttaching DiskStateState = "attaching"
)
const (
	// DiskStateStateCreating represents the DiskStateState `"creating"`.
	DiskStateStateCreating DiskStateState = "creating"
)
const (
	// DiskStateStateDestroyed represents the DiskStateState `"destroyed"`.
	DiskStateStateDestroyed DiskStateState = "destroyed"
)
const (
	// DiskStateStateDetached represents the DiskStateState `"detached"`.
	DiskStateStateDetached DiskStateState = "detached"
)
const (
	// DiskStateStateDetaching represents the DiskStateState `"detaching"`.
	DiskStateStateDetaching DiskStateState = "detaching"
)
const (
	// DiskStateStateFaulted represents the DiskStateState `"faulted"`.
	DiskStateStateFaulted DiskStateState = "faulted"
)

type DisksService added in v0.0.7

type DisksService service

func (*DisksService) Create added in v0.0.7

func (s *DisksService) Create(organizationName Name, projectName Name, j *DiskCreate) (*Disk, error)

Create a disk in a project.

  • TODO-correctness See note about instance create. This should be async.

Parameters:

  • `organizationName`
  • `projectName`

func (*DisksService) Delete added in v0.0.7

func (s *DisksService) Delete(diskName Name, organizationName Name, projectName Name) error

Delete

Delete a disk from a project.

Parameters:

  • `diskName`
  • `organizationName`
  • `projectName`

func (*DisksService) Get added in v0.0.7

func (s *DisksService) Get(diskName Name, organizationName Name, projectName Name) (*Disk, error)

Get

Fetch a single disk in a project.

Parameters:

  • `diskName`
  • `organizationName`
  • `projectName`

func (*DisksService) List added in v0.0.7

func (s *DisksService) List(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name) (*DiskResultsPage, error)

List

List disks in a project.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`

func (*DisksService) ListAllPages added in v0.0.7

func (s *DisksService) ListAllPages(sortBy NameSortMode, organizationName Name, projectName Name) (*[]Disk, error)

ListAllPages

List disks in a project.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`

type FieldSchema

type FieldSchema struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Source is the source from which a field is derived, the target or metric.
	Source FieldSource `json:"source,omitempty" yaml:"source,omitempty"`
	// Ty is the `FieldType` identifies the data type of a target or metric field.
	Ty FieldType `json:"ty,omitempty" yaml:"ty,omitempty"`
}

FieldSchema is the name and type information for a field of a timeseries schema.

type FieldSource

type FieldSource string

FieldSource is the source from which a field is derived, the target or metric.

const (
	// FieldSourceTarget represents the FieldSource `"Target"`.
	FieldSourceTarget FieldSource = "Target"
	// FieldSourceMetric represents the FieldSource `"Metric"`.
	FieldSourceMetric FieldSource = "Metric"
)

type FieldType

type FieldType string

FieldType is the `FieldType` identifies the data type of a target or metric field.

const (
	// FieldTypeString represents the FieldType `"String"`.
	FieldTypeString FieldType = "String"
	// FieldTypeI64 represents the FieldType `"I64"`.
	FieldTypeI64 FieldType = "I64"
	// FieldTypeIpAddr represents the FieldType `"IpAddr"`.
	FieldTypeIpAddr FieldType = "IpAddr"
	// FieldTypeUuid represents the FieldType `"Uuid"`.
	FieldTypeUuid FieldType = "Uuid"
	// FieldTypeBool represents the FieldType `"Bool"`.
	FieldTypeBool FieldType = "Bool"
)

type FirewallRule added in v0.0.7

type FirewallRule struct {
	// Action is whether traffic matching the rule should be allowed or dropped
	Action FirewallRuleAction `json:"action,omitempty" yaml:"action,omitempty"`
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Direction is whether this rule is for incoming or outgoing traffic
	Direction FirewallRuleDirection `json:"direction,omitempty" yaml:"direction,omitempty"`
	// Filters is reductions on the scope of the rule
	Filters FirewallRuleFilter `json:"filters,omitempty" yaml:"filters,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// Priority is the relative priority of this rule
	Priority int `json:"priority,omitempty" yaml:"priority,omitempty"`
	// Status is whether this rule is in effect
	Status FirewallRuleStatus `json:"status,omitempty" yaml:"status,omitempty"`
	// Targets is list of sets of instances that the rule applies to
	Targets []FirewallRuleTarget `json:"targets,omitempty" yaml:"targets,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

FirewallRule is a single rule in a VPC firewall

type FirewallRuleAction added in v0.0.7

type FirewallRuleAction string

FirewallRuleAction is the type definition for a FirewallRuleAction.

const (
	// FirewallRuleActionAllow represents the FirewallRuleAction `"allow"`.
	FirewallRuleActionAllow FirewallRuleAction = "allow"
	// FirewallRuleActionDeny represents the FirewallRuleAction `"deny"`.
	FirewallRuleActionDeny FirewallRuleAction = "deny"
)

type FirewallRuleDirection added in v0.0.7

type FirewallRuleDirection string

FirewallRuleDirection is the type definition for a FirewallRuleDirection.

const (
	// FirewallRuleDirectionInbound represents the FirewallRuleDirection `"inbound"`.
	FirewallRuleDirectionInbound FirewallRuleDirection = "inbound"
	// FirewallRuleDirectionOutbound represents the FirewallRuleDirection `"outbound"`.
	FirewallRuleDirectionOutbound FirewallRuleDirection = "outbound"
)

type FirewallRuleFilter added in v0.0.7

type FirewallRuleFilter struct {
	// Hosts is if present, the sources (if incoming) or destinations (if outgoing) this rule applies to.
	Hosts []FirewallRuleHostFilter `json:"hosts,omitempty" yaml:"hosts,omitempty"`
	// Ports is if present, the destination ports this rule applies to.
	Ports []L4PortRange `json:"ports,omitempty" yaml:"ports,omitempty"`
	// Protocols is if present, the networking protocols this rule applies to.
	Protocols []FirewallRuleProtocol `json:"protocols,omitempty" yaml:"protocols,omitempty"`
}

FirewallRuleFilter is filter for a firewall rule. A given packet must match every field that is present for the rule to apply to it. A packet matches a field if any entry in that field matches the packet.

type FirewallRuleHostFilter added in v0.0.7

type FirewallRuleHostFilter struct {
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Value Name   `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilter is a subset of [`NetworkTarget`], `VpcFirewallRuleHostFilter` specifies all possible targets that a route can forward to.

type FirewallRuleHostFilterInstance added in v0.0.7

type FirewallRuleHostFilterInstance struct {
	Type FirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterInstance is the type definition for a FirewallRuleHostFilterInstance.

type FirewallRuleHostFilterInternetGateway

type FirewallRuleHostFilterInternetGateway struct {
	Type FirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterInternetGateway is the type definition for a FirewallRuleHostFilterInternetGateway.

type FirewallRuleHostFilterIp added in v0.0.7

type FirewallRuleHostFilterIp struct {
	Type  FirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	Value string                     `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterIp is the type definition for a FirewallRuleHostFilterIp.

type FirewallRuleHostFilterSubnet added in v0.0.7

type FirewallRuleHostFilterSubnet struct {
	Type FirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterSubnet is the type definition for a FirewallRuleHostFilterSubnet.

type FirewallRuleHostFilterType added in v0.0.7

type FirewallRuleHostFilterType string

FirewallRuleHostFilterType is the type definition for a FirewallRuleHostFilterType.

const (
	// FirewallRuleHostFilterTypeInstance represents the FirewallRuleHostFilterType `"instance"`.
	FirewallRuleHostFilterTypeInstance FirewallRuleHostFilterType = "instance"
)
const (
	// FirewallRuleHostFilterTypeInternetGateway represents the FirewallRuleHostFilterType `"internet_gateway"`.
	FirewallRuleHostFilterTypeInternetGateway FirewallRuleHostFilterType = "internet_gateway"
)
const (
	// FirewallRuleHostFilterTypeIp represents the FirewallRuleHostFilterType `"ip"`.
	FirewallRuleHostFilterTypeIp FirewallRuleHostFilterType = "ip"
)
const (
	// FirewallRuleHostFilterTypeSubnet represents the FirewallRuleHostFilterType `"subnet"`.
	FirewallRuleHostFilterTypeSubnet FirewallRuleHostFilterType = "subnet"
)
const (
	// FirewallRuleHostFilterTypeVpc represents the FirewallRuleHostFilterType `"vpc"`.
	FirewallRuleHostFilterTypeVpc FirewallRuleHostFilterType = "vpc"
)

type FirewallRuleHostFilterVPC added in v0.0.7

type FirewallRuleHostFilterVPC struct {
	Type FirewallRuleHostFilterType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleHostFilterVPC is the type definition for a FirewallRuleHostFilterVPC.

type FirewallRuleProtocol added in v0.0.7

type FirewallRuleProtocol string

FirewallRuleProtocol is the protocols that may be specified in a firewall rule's filter

const (
	// FirewallRuleProtocolTCP represents the FirewallRuleProtocol `"TCP"`.
	FirewallRuleProtocolTCP FirewallRuleProtocol = "TCP"
	// FirewallRuleProtocolUDP represents the FirewallRuleProtocol `"UDP"`.
	FirewallRuleProtocolUDP FirewallRuleProtocol = "UDP"
	// FirewallRuleProtocolICMP represents the FirewallRuleProtocol `"ICMP"`.
	FirewallRuleProtocolICMP FirewallRuleProtocol = "ICMP"
)

type FirewallRuleResultsPage

type FirewallRuleResultsPage struct {
	// Items is list of items on this page of results
	Items []FirewallRule `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

FirewallRuleResultsPage is a single page of results

type FirewallRuleStatus added in v0.0.7

type FirewallRuleStatus string

FirewallRuleStatus is the type definition for a FirewallRuleStatus.

const (
	// FirewallRuleStatusDisabled represents the FirewallRuleStatus `"disabled"`.
	FirewallRuleStatusDisabled FirewallRuleStatus = "disabled"
	// FirewallRuleStatusEnabled represents the FirewallRuleStatus `"enabled"`.
	FirewallRuleStatusEnabled FirewallRuleStatus = "enabled"
)

type FirewallRuleTarget added in v0.0.7

type FirewallRuleTarget struct {
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Value Name   `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleTarget is a subset of [`NetworkTarget`], `VpcFirewallRuleTarget` specifies all possible targets that a firewall rule can be attached to.

type FirewallRuleTargetInstance added in v0.0.7

type FirewallRuleTargetInstance struct {
	Type FirewallRuleTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleTargetInstance is the type definition for a FirewallRuleTargetInstance.

type FirewallRuleTargetSubnet added in v0.0.7

type FirewallRuleTargetSubnet struct {
	Type FirewallRuleTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleTargetSubnet is the type definition for a FirewallRuleTargetSubnet.

type FirewallRuleTargetType added in v0.0.7

type FirewallRuleTargetType string

FirewallRuleTargetType is the type definition for a FirewallRuleTargetType.

const (
	// FirewallRuleTargetTypeInstance represents the FirewallRuleTargetType `"instance"`.
	FirewallRuleTargetTypeInstance FirewallRuleTargetType = "instance"
)
const (
	// FirewallRuleTargetTypeSubnet represents the FirewallRuleTargetType `"subnet"`.
	FirewallRuleTargetTypeSubnet FirewallRuleTargetType = "subnet"
)
const (
	// FirewallRuleTargetTypeVpc represents the FirewallRuleTargetType `"vpc"`.
	FirewallRuleTargetTypeVpc FirewallRuleTargetType = "vpc"
)

type FirewallRuleTargetVPC added in v0.0.7

type FirewallRuleTargetVPC struct {
	Type FirewallRuleTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

FirewallRuleTargetVPC is the type definition for a FirewallRuleTargetVPC.

type FirewallRuleUpdate added in v0.0.7

type FirewallRuleUpdate struct {
	// Action is whether traffic matching the rule should be allowed or dropped
	Action FirewallRuleAction `json:"action,omitempty" yaml:"action,omitempty"`
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Direction is whether this rule is for incoming or outgoing traffic
	Direction FirewallRuleDirection `json:"direction,omitempty" yaml:"direction,omitempty"`
	// Filters is reductions on the scope of the rule
	Filters FirewallRuleFilter `json:"filters,omitempty" yaml:"filters,omitempty"`
	// Priority is the relative priority of this rule
	Priority int `json:"priority,omitempty" yaml:"priority,omitempty"`
	// Status is whether this rule is in effect
	Status FirewallRuleStatus `json:"status,omitempty" yaml:"status,omitempty"`
	// Targets is list of sets of instances that the rule applies to
	Targets []FirewallRuleTarget `json:"targets,omitempty" yaml:"targets,omitempty"`
}

FirewallRuleUpdate is a single rule in a VPC firewall

type FirewallRuleUpdateParams added in v0.0.7

type FirewallRuleUpdateParams struct {
}

FirewallRuleUpdateParams is updateable properties of a [`Vpc`]'s firewall Note that VpcFirewallRules are implicitly created along with a Vpc, so there is no explicit creation.

type FirewallRuleUpdateResult

type FirewallRuleUpdateResult struct {
}

FirewallRuleUpdateResult is response to an update replacing [`Vpc`]'s firewall

type FirewallService added in v0.0.7

type FirewallService service

func (*FirewallService) RulesList added in v0.0.7

func (s *FirewallService) RulesList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*FirewallRuleResultsPage, error)

RulesList

List firewall rules for a VPC.

To iterate over all pages, use the `RulesListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*FirewallService) RulesListAllPages

func (s *FirewallService) RulesListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*[]FirewallRule, error)

RulesListAllPages

List firewall rules for a VPC.

This method is a wrapper around the `RulesList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*FirewallService) RulesPut added in v0.0.7

func (s *FirewallService) RulesPut(organizationName Name, projectName Name, vpcName Name, j *FirewallRuleUpdateParams) (*FirewallRuleUpdateResult, error)

Replace the firewall rules for a VPC

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

type HTTPError

type HTTPError struct {
	// URL is the URL that was being accessed when the error occurred.
	// It will always be populated.
	URL *url.URL
	// StatusCode is the HTTP response status code and will always be populated.
	StatusCode int
	// Message is the server response message and is only populated when
	// explicitly referenced by the JSON server response.
	Message string
	// Body is the raw response returned by the server.
	// It is often but not always JSON, depending on how the request fails.
	Body string
	// Header contains the response header fields from the server.
	Header http.Header
}

HTTPError is an error returned by a failed API call.

func (HTTPError) Error

func (err HTTPError) Error() string

Error converts the Error type to a readable string.

type HiddenService added in v0.0.7

type HiddenService service

func (*HiddenService) Logout added in v0.0.7

func (s *HiddenService) Logout() error

Logout

func (*HiddenService) SessionMe added in v0.0.7

func (s *HiddenService) SessionMe() (*SessionUser, error)

SessionMe

Fetch the user associated with the current session

func (*HiddenService) SpoofLogin added in v0.0.7

func (s *HiddenService) SpoofLogin(j *LoginParams) error

SpoofLogin

type IPv4Net

type IPv4Net string

IPv4Net is an IPv4 subnet, including prefix and subnet mask

type IPv6Net

type IPv6Net string

IPv6Net is an IPv6 subnet, including prefix and subnet mask

type IdSortMode added in v0.0.6

type IdSortMode string

IdSortMode is supported set of sort modes for scanning by id only.

Currently, we only support scanning in ascending order.

const (
	// IdSortModeIdAscending represents the IdSortMode `"id-ascending"`.
	IdSortModeIdAscending IdSortMode = "id-ascending"
)

type Instance

type Instance struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Hostname is rFC1035-compliant hostname for the Instance.
	Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Memory is memory allocated for this Instance
	Memory ByteCount `json:"memory,omitempty" yaml:"memory,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// NCPUs is number of CPUs allocated for this Instance
	NCPUs InstanceCPUCount `json:"ncpus,omitempty" yaml:"ncpus,omitempty"`
	// ProjectID is id for the project containing this Instance
	ProjectID string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
	// RunState is running state of an Instance (primarily: booted or stopped)
	//
	// This typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle
	RunState InstanceState `json:"run_state,omitempty" yaml:"run_state,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified        *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	TimeRunStateUpdated *time.Time `json:"time_run_state_updated,omitempty" yaml:"time_run_state_updated,omitempty"`
}

Instance is client view of an [`Instance`]

type InstanceCPUCount added in v0.0.4

type InstanceCPUCount int

InstanceCPUCount is the number of CPUs in an Instance

type InstanceCreate

type InstanceCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Hostname    string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
	// Memory is a count of bytes, typically used either for memory or storage capacity
	//
	// The maximum supported byte count is [`i64::MAX`].  This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX).  We provide all of these for consumers' convenience.
	Memory ByteCount `json:"memory,omitempty" yaml:"memory,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// NCPUs is the number of CPUs in an Instance
	NCPUs InstanceCPUCount `json:"ncpus,omitempty" yaml:"ncpus,omitempty"`
}

InstanceCreate is create-time parameters for an [`Instance`]

type InstanceResultsPage

type InstanceResultsPage struct {
	// Items is list of items on this page of results
	Items []Instance `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

InstanceResultsPage is a single page of results

type InstanceState

type InstanceState string

InstanceState is running state of an Instance (primarily: booted or stopped)

This typically reflects whether it's starting, running, stopping, or stopped, but also includes states related to the Instance's lifecycle

const (
	// InstanceStateCreating represents the InstanceState `"creating"`.
	InstanceStateCreating InstanceState = "creating"
	// InstanceStateStarting represents the InstanceState `"starting"`.
	InstanceStateStarting InstanceState = "starting"
	// InstanceStateRunning represents the InstanceState `"running"`.
	InstanceStateRunning InstanceState = "running"
	// InstanceStateStopping represents the InstanceState `"stopping"`.
	InstanceStateStopping InstanceState = "stopping"
	// InstanceStateStopped represents the InstanceState `"stopped"`.
	InstanceStateStopped InstanceState = "stopped"
	// InstanceStateRebooting represents the InstanceState `"rebooting"`.
	InstanceStateRebooting InstanceState = "rebooting"
	// InstanceStateRepairing represents the InstanceState `"repairing"`.
	InstanceStateRepairing InstanceState = "repairing"
	// InstanceStateFailed represents the InstanceState `"failed"`.
	InstanceStateFailed InstanceState = "failed"
	// InstanceStateDestroyed represents the InstanceState `"destroyed"`.
	InstanceStateDestroyed InstanceState = "destroyed"
)

type InstancesService added in v0.0.3

type InstancesService service

func (*InstancesService) Create added in v0.0.3

func (s *InstancesService) Create(organizationName Name, projectName Name, j *InstanceCreate) (*Instance, error)

Create an instance in a project.

  • TODO-correctness This is supposed to be async. Is that right? We can create the instance immediately -- it's just not booted yet. Maybe the boot operation is what's a separate operation_id. What about the response code (201 Created vs 202 Accepted)? Is that orthogonal? Things can return a useful response, including an operation id, with either response code. Maybe a "reboot" operation would return a 202 Accepted because there's no actual resource created?

Parameters:

  • `organizationName`
  • `projectName`

func (*InstancesService) Delete added in v0.0.3

func (s *InstancesService) Delete(instanceName Name, organizationName Name, projectName Name) error

Delete

Delete an instance from a project.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) DisksAttach added in v0.0.3

func (s *InstancesService) DisksAttach(instanceName Name, organizationName Name, projectName Name, j *DiskIdentifier) (*Disk, error)

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) DisksDetach added in v0.0.3

func (s *InstancesService) DisksDetach(instanceName Name, organizationName Name, projectName Name, j *DiskIdentifier) (*Disk, error)

DisksDetach

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) DisksList added in v0.0.3

func (s *InstancesService) DisksList(limit int, pageToken string, sortBy NameSortMode, instanceName Name, organizationName Name, projectName Name) (*DiskResultsPage, error)

DisksList

List disks attached to this instance.

To iterate over all pages, use the `DisksListAllPages` method, instead.

Parameters:

  • `instanceName`
  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`

func (*InstancesService) DisksListAllPages added in v0.0.3

func (s *InstancesService) DisksListAllPages(sortBy NameSortMode, instanceName Name, organizationName Name, projectName Name) (*[]Disk, error)

DisksListAllPages

List disks attached to this instance.

This method is a wrapper around the `DisksList` method. This method returns all the pages at once.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`
  • `sortBy`

func (*InstancesService) Get added in v0.0.3

func (s *InstancesService) Get(instanceName Name, organizationName Name, projectName Name) (*Instance, error)

Get

Get an instance in a project.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) List added in v0.0.3

func (s *InstancesService) List(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name) (*InstanceResultsPage, error)

List

List instances in a project.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`

func (*InstancesService) ListAllPages added in v0.0.3

func (s *InstancesService) ListAllPages(sortBy NameSortMode, organizationName Name, projectName Name) (*[]Instance, error)

ListAllPages

List instances in a project.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`

func (*InstancesService) Reboot added in v0.0.3

func (s *InstancesService) Reboot(instanceName Name, organizationName Name, projectName Name) (*Instance, error)

Reboot

Reboot an instance.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) Start added in v0.0.3

func (s *InstancesService) Start(instanceName Name, organizationName Name, projectName Name) (*Instance, error)

Start

Boot an instance.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

func (*InstancesService) Stop added in v0.0.3

func (s *InstancesService) Stop(instanceName Name, organizationName Name, projectName Name) (*Instance, error)

Stop

Halt an instance.

Parameters:

  • `instanceName`
  • `organizationName`
  • `projectName`

type L4PortRange

type L4PortRange string

L4PortRange is an inclusive-inclusive range of IP ports. The second port may be omitted to represent a single port

type LoginParams

type LoginParams struct {
	Username string `json:"username,omitempty" yaml:"username,omitempty"`
}

LoginParams is the type definition for a LoginParams.

type MacAddr

type MacAddr string

MacAddr is a Media Access Control address, in EUI-48 format

type MetricsService added in v0.0.3

type MetricsService service

func (*MetricsService) TimeseriesSchemaList added in v0.0.3

func (s *MetricsService) TimeseriesSchemaList(limit int, pageToken string) (*TimeseriesSchemaResultsPage, error)

TimeseriesSchemaList

List all timeseries schema

To iterate over all pages, use the `TimeseriesSchemaListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`

func (*MetricsService) TimeseriesSchemaListAllPages added in v0.0.3

func (s *MetricsService) TimeseriesSchemaListAllPages() (*[]TimeseriesSchema, error)

TimeseriesSchemaListAllPages

List all timeseries schema

This method is a wrapper around the `TimeseriesSchemaList` method. This method returns all the pages at once.

type Name

type Name string

Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.

type NameOrIdSortMode

type NameOrIdSortMode string

NameOrIdSortMode is supported set of sort modes for scanning by name or id

const (
	// NameOrIdSortModeNameAscending represents the NameOrIdSortMode `"name-ascending"`.
	NameOrIdSortModeNameAscending NameOrIdSortMode = "name-ascending"
	// NameOrIdSortModeNameDescending represents the NameOrIdSortMode `"name-descending"`.
	NameOrIdSortModeNameDescending NameOrIdSortMode = "name-descending"
	// NameOrIdSortModeIdAscending represents the NameOrIdSortMode `"id-ascending"`.
	NameOrIdSortModeIdAscending NameOrIdSortMode = "id-ascending"
)

type NameSortMode

type NameSortMode string

NameSortMode is supported set of sort modes for scanning by name only

Currently, we only support scanning in ascending order.

const (
	// NameSortModeNameAscending represents the NameSortMode `"name-ascending"`.
	NameSortModeNameAscending NameSortMode = "name-ascending"
)

type NetworkInterface

type NetworkInterface struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// InstanceID is the Instance to which the interface belongs.
	InstanceID string `json:"instance_id,omitempty" yaml:"instance_id,omitempty"`
	// Ip is the IP address assigned to this interface.
	Ip string `json:"ip,omitempty" yaml:"ip,omitempty"`
	// Mac is the MAC address assigned to this interface.
	Mac MacAddr `json:"mac,omitempty" yaml:"mac,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// SubnetID is the subnet to which the interface belongs.
	SubnetID string `json:"subnet_id,omitempty" yaml:"subnet_id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// VPCId is the VPC to which the interface belongs.
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

NetworkInterface is a `NetworkInterface` represents a virtual network interface device.

type NetworkInterfaceResultsPage

type NetworkInterfaceResultsPage struct {
	// Items is list of items on this page of results
	Items []NetworkInterface `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

NetworkInterfaceResultsPage is a single page of results

type Organization

type Organization struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

Organization is client view of an [`Organization`]

type OrganizationCreate

type OrganizationCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

OrganizationCreate is create-time parameters for an [`Organization`]

type OrganizationResultsPage

type OrganizationResultsPage struct {
	// Items is list of items on this page of results
	Items []Organization `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

OrganizationResultsPage is a single page of results

type OrganizationUpdate

type OrganizationUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Name        Name   `json:"name,omitempty" yaml:"name,omitempty"`
}

OrganizationUpdate is updateable properties of an [`Organization`]

type OrganizationsService added in v0.0.3

type OrganizationsService service

func (*OrganizationsService) Create added in v0.0.3

Create a new organization.

func (*OrganizationsService) Delete added in v0.0.3

func (s *OrganizationsService) Delete(organizationName Name) error

Delete

Delete a specific organization.

Parameters:

  • `organizationName`

func (*OrganizationsService) Get added in v0.0.3

func (s *OrganizationsService) Get(organizationName Name) (*Organization, error)

Get

Fetch a specific organization

Parameters:

  • `organizationName`

func (*OrganizationsService) List added in v0.0.3

func (s *OrganizationsService) List(limit int, pageToken string, sortBy NameOrIdSortMode) (*OrganizationResultsPage, error)

List

List all organizations.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*OrganizationsService) ListAllPages added in v0.0.3

func (s *OrganizationsService) ListAllPages(sortBy NameOrIdSortMode) (*[]Organization, error)

ListAllPages

List all organizations.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

func (*OrganizationsService) Put added in v0.0.3

func (s *OrganizationsService) Put(organizationName Name, j *OrganizationUpdate) (*Organization, error)

Put

Update a specific organization.

  • TODO-correctness: Is it valid for PUT to accept application/json that's a subset of what the resource actually represents? If not, is that a problem? (HTTP may require that this be idempotent.) If so, can we get around that having this be a slightly different content-type (e.g., "application/json-patch")? We should see what other APIs do.

Parameters:

  • `organizationName`

type Project

type Project struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name           Name   `json:"name,omitempty" yaml:"name,omitempty"`
	OrganizationID string `json:"organization_id,omitempty" yaml:"organization_id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

Project is client view of a [`Project`]

type ProjectCreate

type ProjectCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

ProjectCreate is create-time parameters for a [`Project`]

type ProjectResultsPage

type ProjectResultsPage struct {
	// Items is list of items on this page of results
	Items []Project `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

ProjectResultsPage is a single page of results

type ProjectUpdate

type ProjectUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Name        Name   `json:"name,omitempty" yaml:"name,omitempty"`
}

ProjectUpdate is updateable properties of a [`Project`]

type ProjectsService added in v0.0.3

type ProjectsService service

func (*ProjectsService) Create added in v0.0.3

func (s *ProjectsService) Create(organizationName Name, j *ProjectCreate) (*Project, error)

Create a new project.

Parameters:

  • `organizationName`

func (*ProjectsService) Delete added in v0.0.3

func (s *ProjectsService) Delete(organizationName Name, projectName Name) error

Delete

Delete a specific project.

Parameters:

  • `organizationName`
  • `projectName`

func (*ProjectsService) Get added in v0.0.3

func (s *ProjectsService) Get(organizationName Name, projectName Name) (*Project, error)

Get

Fetch a specific project

Parameters:

  • `organizationName`
  • `projectName`

func (*ProjectsService) List added in v0.0.3

func (s *ProjectsService) List(limit int, pageToken string, sortBy NameOrIdSortMode, organizationName Name) (*ProjectResultsPage, error)

List

List all projects.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `sortBy`

func (*ProjectsService) ListAllPages added in v0.0.3

func (s *ProjectsService) ListAllPages(sortBy NameOrIdSortMode, organizationName Name) (*[]Project, error)

ListAllPages

List all projects.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `sortBy`

func (*ProjectsService) Put added in v0.0.7

func (s *ProjectsService) Put(organizationName Name, projectName Name, j *ProjectUpdate) (*Project, error)

Put

Update a specific project.

  • TODO-correctness: Is it valid for PUT to accept application/json that's a subset of what the resource actually represents? If not, is that a problem? (HTTP may require that this be idempotent.) If so, can we get around that having this be a slightly different content-type (e.g., "application/json-patch")? We should see what other APIs do.

Parameters:

  • `organizationName`
  • `projectName`

type Rack

type Rack struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

Rack is client view of an [`Rack`]

type RackResultsPage

type RackResultsPage struct {
	// Items is list of items on this page of results
	Items []Rack `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

RackResultsPage is a single page of results

type RacksService added in v0.0.7

type RacksService service

func (*RacksService) Get added in v0.0.7

func (s *RacksService) Get(rackID string) (*Rack, error)

Fetch information about a particular rack.

Parameters:

  • `rackId`

func (*RacksService) List added in v0.0.7

func (s *RacksService) List(limit int, pageToken string, sortBy IdSortMode) (*RackResultsPage, error)

List

List racks in the system.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*RacksService) ListAllPages added in v0.0.7

func (s *RacksService) ListAllPages(sortBy IdSortMode) (*[]Rack, error)

ListAllPages

List racks in the system.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

type Role

type Role struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is role names consist of two string components separated by dot (".").
	Name RoleName `json:"name,omitempty" yaml:"name,omitempty"`
}

Role is client view of a [`Role`]

type RoleName

type RoleName string

RoleName is role names consist of two string components separated by dot (".").

type RoleResultsPage

type RoleResultsPage struct {
	// Items is list of items on this page of results
	Items []Role `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

RoleResultsPage is a single page of results

type RolesService added in v0.0.3

type RolesService service

func (*RolesService) Get added in v0.0.3

func (s *RolesService) Get(roleName string) (*Role, error)

Fetch a specific built-in role

Parameters:

  • `roleName`

func (*RolesService) List added in v0.0.3

func (s *RolesService) List(limit int, pageToken string) (*RoleResultsPage, error)

List the built-in roles

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`

func (*RolesService) ListAllPages added in v0.0.3

func (s *RolesService) ListAllPages() (*[]Role, error)

ListAllPages

List the built-in roles

This method is a wrapper around the `List` method. This method returns all the pages at once.

type RouteDestination

type RouteDestination struct {
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestination is a subset of [`NetworkTarget`], `RouteDestination` specifies the kind of network traffic that will be matched to be forwarded to the [`RouteTarget`].

type RouteDestinationIp

type RouteDestinationIp struct {
	Type  RouteDestinationType `json:"type,omitempty" yaml:"type,omitempty"`
	Value string               `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationIp is the type definition for a RouteDestinationIp.

type RouteDestinationSubnet

type RouteDestinationSubnet struct {
	Type RouteDestinationType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationSubnet is the type definition for a RouteDestinationSubnet.

type RouteDestinationType

type RouteDestinationType string

RouteDestinationType is the type definition for a RouteDestinationType.

const (
	// RouteDestinationTypeIp represents the RouteDestinationType `"ip"`.
	RouteDestinationTypeIp RouteDestinationType = "ip"
)
const (
	// RouteDestinationTypeSubnet represents the RouteDestinationType `"subnet"`.
	RouteDestinationTypeSubnet RouteDestinationType = "subnet"
)
const (
	// RouteDestinationTypeVpc represents the RouteDestinationType `"vpc"`.
	RouteDestinationTypeVpc RouteDestinationType = "vpc"
)

type RouteDestinationVPC

type RouteDestinationVPC struct {
	Type RouteDestinationType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteDestinationVPC is the type definition for a RouteDestinationVPC.

type RouteTarget

type RouteTarget struct {
	Type  string `json:"type,omitempty" yaml:"type,omitempty"`
	Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTarget is a subset of [`NetworkTarget`], `RouteTarget` specifies all possible targets that a route can forward to.

type RouteTargetInstance

type RouteTargetInstance struct {
	Type RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetInstance is the type definition for a RouteTargetInstance.

type RouteTargetInternetGateway

type RouteTargetInternetGateway struct {
	Type RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetInternetGateway is the type definition for a RouteTargetInternetGateway.

type RouteTargetIp

type RouteTargetIp struct {
	Type  RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	Value string          `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetIp is the type definition for a RouteTargetIp.

type RouteTargetSubnet

type RouteTargetSubnet struct {
	Type RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetSubnet is the type definition for a RouteTargetSubnet.

type RouteTargetType

type RouteTargetType string

RouteTargetType is the type definition for a RouteTargetType.

const (
	// RouteTargetTypeInstance represents the RouteTargetType `"instance"`.
	RouteTargetTypeInstance RouteTargetType = "instance"
)
const (
	// RouteTargetTypeInternetGateway represents the RouteTargetType `"internet_gateway"`.
	RouteTargetTypeInternetGateway RouteTargetType = "internet_gateway"
)
const (
	// RouteTargetTypeIp represents the RouteTargetType `"ip"`.
	RouteTargetTypeIp RouteTargetType = "ip"
)
const (
	// RouteTargetTypeSubnet represents the RouteTargetType `"subnet"`.
	RouteTargetTypeSubnet RouteTargetType = "subnet"
)
const (
	// RouteTargetTypeVpc represents the RouteTargetType `"vpc"`.
	RouteTargetTypeVpc RouteTargetType = "vpc"
)

type RouteTargetVPC

type RouteTargetVPC struct {
	Type RouteTargetType `json:"type,omitempty" yaml:"type,omitempty"`
	// Value is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Value Name `json:"value,omitempty" yaml:"value,omitempty"`
}

RouteTargetVPC is the type definition for a RouteTargetVPC.

type Router added in v0.0.7

type Router struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID   string     `json:"id,omitempty" yaml:"id,omitempty"`
	Kind RouterKind `json:"kind,omitempty" yaml:"kind,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// VPCId is the VPC to which the router belongs.
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

Router is a VPC router defines a series of rules that indicate where traffic should be sent depending on its destination.

type RouterCreate added in v0.0.7

type RouterCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

RouterCreate is create-time parameters for a [`VpcRouter`]

type RouterKind added in v0.0.7

type RouterKind string

RouterKind is the type definition for a RouterKind.

const (
	// RouterKindSystem represents the RouterKind `"system"`.
	RouterKindSystem RouterKind = "system"
	// RouterKindCustom represents the RouterKind `"custom"`.
	RouterKindCustom RouterKind = "custom"
)

type RouterResultsPage added in v0.0.7

type RouterResultsPage struct {
	// Items is list of items on this page of results
	Items []Router `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

RouterResultsPage is a single page of results

type RouterRoute

type RouterRoute struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Destination is a subset of [`NetworkTarget`], `RouteDestination` specifies the kind of network traffic that will be matched to be forwarded to the [`RouteTarget`].
	Destination RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Kind is describes the kind of router. Set at creation. `read-only`
	Kind RouterRouteKind `json:"kind,omitempty" yaml:"kind,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// RouterID is the VPC Router to which the route belongs.
	RouterID string `json:"router_id,omitempty" yaml:"router_id,omitempty"`
	// Target is a subset of [`NetworkTarget`], `RouteTarget` specifies all possible targets that a route can forward to.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

RouterRoute is a route defines a rule that governs where traffic should be sent based on its destination.

type RouterRouteCreateParams

type RouterRouteCreateParams struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Destination is a subset of [`NetworkTarget`], `RouteDestination` specifies the kind of network traffic that will be matched to be forwarded to the [`RouteTarget`].
	Destination RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// Target is a subset of [`NetworkTarget`], `RouteTarget` specifies all possible targets that a route can forward to.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
}

RouterRouteCreateParams is create-time parameters for a [`RouterRoute`]

type RouterRouteKind

type RouterRouteKind string

RouterRouteKind is the classification of a [`RouterRoute`] as defined by the system. The kind determines certain attributes such as if the route is modifiable and describes how or where the route was created.

See [RFD-21](https://rfd.shared.oxide.computer/rfd/0021#concept-router) for more context

const (
	// RouterRouteKindDefault represents the RouterRouteKind `"default"`.
	RouterRouteKindDefault RouterRouteKind = "default"
	// RouterRouteKindVpcSubnet represents the RouterRouteKind `"vpc_subnet"`.
	RouterRouteKindVpcSubnet RouterRouteKind = "vpc_subnet"
	// RouterRouteKindVpcPeering represents the RouterRouteKind `"vpc_peering"`.
	RouterRouteKindVpcPeering RouterRouteKind = "vpc_peering"
	// RouterRouteKindCustom represents the RouterRouteKind `"custom"`.
	RouterRouteKindCustom RouterRouteKind = "custom"
)

type RouterRouteResultsPage

type RouterRouteResultsPage struct {
	// Items is list of items on this page of results
	Items []RouterRoute `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

RouterRouteResultsPage is a single page of results

type RouterRouteUpdateParams

type RouterRouteUpdateParams struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Destination is a subset of [`NetworkTarget`], `RouteDestination` specifies the kind of network traffic that will be matched to be forwarded to the [`RouteTarget`].
	Destination RouteDestination `json:"destination,omitempty" yaml:"destination,omitempty"`
	Name        Name             `json:"name,omitempty" yaml:"name,omitempty"`
	// Target is a subset of [`NetworkTarget`], `RouteTarget` specifies all possible targets that a route can forward to.
	Target RouteTarget `json:"target,omitempty" yaml:"target,omitempty"`
}

RouterRouteUpdateParams is updateable properties of a [`RouterRoute`]

type RouterUpdate added in v0.0.7

type RouterUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	Name        Name   `json:"name,omitempty" yaml:"name,omitempty"`
}

RouterUpdate is updateable properties of a [`VpcRouter`]

type RoutersService added in v0.0.7

type RoutersService service

func (*RoutersService) Create added in v0.0.7

func (s *RoutersService) Create(organizationName Name, projectName Name, vpcName Name, j *RouterCreate) (*Router, error)

Create a VPC Router

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*RoutersService) Delete added in v0.0.7

func (s *RoutersService) Delete(organizationName Name, projectName Name, routerName Name, vpcName Name) error

Delete

Delete a router from its VPC

Parameters:

  • `organizationName`
  • `projectName`
  • `routerName`
  • `vpcName`

func (*RoutersService) Get added in v0.0.7

func (s *RoutersService) Get(organizationName Name, projectName Name, routerName Name, vpcName Name) (*Router, error)

Get

Get a VPC Router

Parameters:

  • `organizationName`
  • `projectName`
  • `routerName`
  • `vpcName`

func (*RoutersService) List added in v0.0.7

func (s *RoutersService) List(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*RouterResultsPage, error)

List

List VPC Custom and System Routers

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*RoutersService) ListAllPages added in v0.0.7

func (s *RoutersService) ListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*[]Router, error)

ListAllPages

List VPC Custom and System Routers

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*RoutersService) Put added in v0.0.7

func (s *RoutersService) Put(organizationName Name, projectName Name, routerName Name, vpcName Name, j *RouterUpdate) error

Put

Update a VPC Router

Parameters:

  • `organizationName`
  • `projectName`
  • `routerName`
  • `vpcName`

type RoutesService added in v0.0.7

type RoutesService service

type Saga

type Saga struct {
	ID    string    `json:"id,omitempty" yaml:"id,omitempty"`
	State SagaState `json:"state,omitempty" yaml:"state,omitempty"`
}

Saga is the type definition for a Saga.

type SagaErrorInfo

type SagaErrorInfo struct {
	Error       string      `json:"error,omitempty" yaml:"error,omitempty"`
	SourceError interface{} `json:"source_error,omitempty" yaml:"source_error,omitempty"`
	Message     string      `json:"message,omitempty" yaml:"message,omitempty"`
}

SagaErrorInfo is the type definition for a SagaErrorInfo.

type SagaErrorInfoActionFailed

type SagaErrorInfoActionFailed struct {
	Error       SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
	SourceError interface{}        `json:"source_error,omitempty" yaml:"source_error,omitempty"`
}

SagaErrorInfoActionFailed is the type definition for a SagaErrorInfoActionFailed.

type SagaErrorInfoDeserializeFailed

type SagaErrorInfoDeserializeFailed struct {
	Error   SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
	Message string             `json:"message,omitempty" yaml:"message,omitempty"`
}

SagaErrorInfoDeserializeFailed is the type definition for a SagaErrorInfoDeserializeFailed.

type SagaErrorInfoError

type SagaErrorInfoError string

SagaErrorInfoError is the type definition for a SagaErrorInfoError.

const (
	// SagaErrorInfoErrorActionFailed represents the SagaErrorInfoError `"action_failed"`.
	SagaErrorInfoErrorActionFailed SagaErrorInfoError = "action_failed"
)
const (
	// SagaErrorInfoErrorDeserializeFailed represents the SagaErrorInfoError `"deserialize_failed"`.
	SagaErrorInfoErrorDeserializeFailed SagaErrorInfoError = "deserialize_failed"
)
const (
	// SagaErrorInfoErrorInjectedError represents the SagaErrorInfoError `"injected_error"`.
	SagaErrorInfoErrorInjectedError SagaErrorInfoError = "injected_error"
)
const (
	// SagaErrorInfoErrorSerializeFailed represents the SagaErrorInfoError `"serialize_failed"`.
	SagaErrorInfoErrorSerializeFailed SagaErrorInfoError = "serialize_failed"
)
const (
	// SagaErrorInfoErrorSubsagaCreateFailed represents the SagaErrorInfoError `"subsaga_create_failed"`.
	SagaErrorInfoErrorSubsagaCreateFailed SagaErrorInfoError = "subsaga_create_failed"
)

type SagaErrorInfoInjectedError

type SagaErrorInfoInjectedError struct {
	Error SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
}

SagaErrorInfoInjectedError is the type definition for a SagaErrorInfoInjectedError.

type SagaErrorInfoSerializeFailed

type SagaErrorInfoSerializeFailed struct {
	Error   SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
	Message string             `json:"message,omitempty" yaml:"message,omitempty"`
}

SagaErrorInfoSerializeFailed is the type definition for a SagaErrorInfoSerializeFailed.

type SagaErrorInfoSubsagaCreateFailed

type SagaErrorInfoSubsagaCreateFailed struct {
	Error   SagaErrorInfoError `json:"error,omitempty" yaml:"error,omitempty"`
	Message string             `json:"message,omitempty" yaml:"message,omitempty"`
}

SagaErrorInfoSubsagaCreateFailed is the type definition for a SagaErrorInfoSubsagaCreateFailed.

type SagaResultsPage

type SagaResultsPage struct {
	// Items is list of items on this page of results
	Items []Saga `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

SagaResultsPage is a single page of results

type SagaState

type SagaState struct {
	State         string        `json:"state,omitempty" yaml:"state,omitempty"`
	ErrorInfo     SagaErrorInfo `json:"error_info,omitempty" yaml:"error_info,omitempty"`
	ErrorNodeName string        `json:"error_node_name,omitempty" yaml:"error_node_name,omitempty"`
}

SagaState is the type definition for a SagaState.

type SagaStateFailed

type SagaStateFailed struct {
	ErrorInfo     SagaErrorInfo  `json:"error_info,omitempty" yaml:"error_info,omitempty"`
	ErrorNodeName string         `json:"error_node_name,omitempty" yaml:"error_node_name,omitempty"`
	State         SagaStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

SagaStateFailed is the type definition for a SagaStateFailed.

type SagaStateRunning

type SagaStateRunning struct {
	State SagaStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

SagaStateRunning is the type definition for a SagaStateRunning.

type SagaStateState

type SagaStateState string

SagaStateState is the type definition for a SagaStateState.

const (
	// SagaStateStateFailed represents the SagaStateState `"failed"`.
	SagaStateStateFailed SagaStateState = "failed"
)
const (
	// SagaStateStateRunning represents the SagaStateState `"running"`.
	SagaStateStateRunning SagaStateState = "running"
)
const (
	// SagaStateStateSucceeded represents the SagaStateState `"succeeded"`.
	SagaStateStateSucceeded SagaStateState = "succeeded"
)

type SagaStateSucceeded

type SagaStateSucceeded struct {
	State SagaStateState `json:"state,omitempty" yaml:"state,omitempty"`
}

SagaStateSucceeded is the type definition for a SagaStateSucceeded.

type SagasService added in v0.0.3

type SagasService service

func (*SagasService) Get added in v0.0.3

func (s *SagasService) Get(sagaID string) (*Saga, error)

Fetch information about a single saga (for debugging)

Parameters:

  • `sagaId`

func (*SagasService) List added in v0.0.3

func (s *SagasService) List(limit int, pageToken string, sortBy IdSortMode) (*SagaResultsPage, error)

List

List all sagas (for debugging)

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*SagasService) ListAllPages added in v0.0.3

func (s *SagasService) ListAllPages(sortBy IdSortMode) (*[]Saga, error)

ListAllPages

List all sagas (for debugging)

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

type SessionUser

type SessionUser struct {
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
}

SessionUser is client view of currently authed user.

type Sled

type Sled struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name           Name   `json:"name,omitempty" yaml:"name,omitempty"`
	ServiceAddress string `json:"service_address,omitempty" yaml:"service_address,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

Sled is client view of an [`Sled`]

type SledResultsPage

type SledResultsPage struct {
	// Items is list of items on this page of results
	Items []Sled `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

SledResultsPage is a single page of results

type SledsService added in v0.0.7

type SledsService service

func (*SledsService) Get added in v0.0.7

func (s *SledsService) Get(sledID string) (*Sled, error)

Fetch information about a sled in the system.

Parameters:

  • `sledId`

func (*SledsService) List added in v0.0.7

func (s *SledsService) List(limit int, pageToken string, sortBy IdSortMode) (*SledResultsPage, error)

List

List sleds in the system.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*SledsService) ListAllPages added in v0.0.7

func (s *SledsService) ListAllPages(sortBy IdSortMode) (*[]Sled, error)

ListAllPages

List sleds in the system.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

type Subnet added in v0.0.7

type Subnet struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// IPv4Block is the IPv4 subnet CIDR block.
	IPv4Block IPv4Net `json:"ipv4_block,omitempty" yaml:"ipv4_block,omitempty"`
	// IPv6Block is the IPv6 subnet CIDR block.
	IPv6Block IPv6Net `json:"ipv6_block,omitempty" yaml:"ipv6_block,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
	// VPCId is the VPC to which the subnet belongs.
	VPCId string `json:"vpc_id,omitempty" yaml:"vpc_id,omitempty"`
}

Subnet is a VPC subnet represents a logical grouping for instances that allows network traffic between them, within a IPv4 subnetwork or optionall an IPv6 subnetwork.

type SubnetCreate added in v0.0.7

type SubnetCreate struct {
	Description string  `json:"description,omitempty" yaml:"description,omitempty"`
	IPv4Block   IPv4Net `json:"ipv4_block,omitempty" yaml:"ipv4_block,omitempty"`
	IPv6Block   IPv6Net `json:"ipv6_block,omitempty" yaml:"ipv6_block,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

SubnetCreate is create-time parameters for a [`VpcSubnet`]

type SubnetResultsPage added in v0.0.7

type SubnetResultsPage struct {
	// Items is list of items on this page of results
	Items []Subnet `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

SubnetResultsPage is a single page of results

type SubnetUpdate added in v0.0.7

type SubnetUpdate struct {
	Description string  `json:"description,omitempty" yaml:"description,omitempty"`
	IPv4Block   IPv4Net `json:"ipv4_block,omitempty" yaml:"ipv4_block,omitempty"`
	IPv6Block   IPv6Net `json:"ipv6_block,omitempty" yaml:"ipv6_block,omitempty"`
	Name        Name    `json:"name,omitempty" yaml:"name,omitempty"`
}

SubnetUpdate is updateable properties of a [`VpcSubnet`]

type SubnetsService added in v0.0.7

type SubnetsService service

func (*SubnetsService) Create added in v0.0.7

func (s *SubnetsService) Create(organizationName Name, projectName Name, vpcName Name, j *SubnetCreate) (*Subnet, error)

Create a subnet in a VPC.

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*SubnetsService) Delete added in v0.0.7

func (s *SubnetsService) Delete(organizationName Name, projectName Name, subnetName Name, vpcName Name) error

Delete

Delete a subnet from a VPC.

Parameters:

  • `organizationName`
  • `projectName`
  • `subnetName`
  • `vpcName`

func (*SubnetsService) Get added in v0.0.7

func (s *SubnetsService) Get(organizationName Name, projectName Name, subnetName Name, vpcName Name) (*Subnet, error)

Get

Get subnet in a VPC.

Parameters:

  • `organizationName`
  • `projectName`
  • `subnetName`
  • `vpcName`

func (*SubnetsService) IPsList

func (s *SubnetsService) IPsList(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, subnetName Name, vpcName Name) (*NetworkInterfaceResultsPage, error)

IPsList

List IP addresses on a VPC subnet.

To iterate over all pages, use the `IPsListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`
  • `subnetName`
  • `vpcName`

func (*SubnetsService) IPsListAllPages

func (s *SubnetsService) IPsListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, subnetName Name, vpcName Name) (*[]NetworkInterface, error)

IPsListAllPages

List IP addresses on a VPC subnet.

This method is a wrapper around the `IPsList` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`
  • `subnetName`
  • `vpcName`

func (*SubnetsService) List added in v0.0.7

func (s *SubnetsService) List(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*SubnetResultsPage, error)

List

List subnets in a VPC.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*SubnetsService) ListAllPages added in v0.0.7

func (s *SubnetsService) ListAllPages(sortBy NameSortMode, organizationName Name, projectName Name, vpcName Name) (*[]Subnet, error)

ListAllPages

List subnets in a VPC.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`
  • `vpcName`

func (*SubnetsService) Put added in v0.0.7

func (s *SubnetsService) Put(organizationName Name, projectName Name, subnetName Name, vpcName Name, j *SubnetUpdate) error

Put

Update a VPC Subnet.

Parameters:

  • `organizationName`
  • `projectName`
  • `subnetName`
  • `vpcName`

type TimeseriesName

type TimeseriesName string

TimeseriesName is names are constructed by concatenating the target and metric names with ':'. Target and metric names must be lowercase alphanumeric characters with '_' separating words.

type TimeseriesSchema

type TimeseriesSchema struct {
	Created *time.Time `json:"created,omitempty" yaml:"created,omitempty"`
	// DatumType is the type of an individual datum of a metric.
	DatumType   DatumType     `json:"datum_type,omitempty" yaml:"datum_type,omitempty"`
	FieldSchema []FieldSchema `json:"field_schema,omitempty" yaml:"field_schema,omitempty"`
	// TimeseriesName is names are constructed by concatenating the target and metric names with ':'. Target and metric names must be lowercase alphanumeric characters with '_' separating words.
	TimeseriesName TimeseriesName `json:"timeseries_name,omitempty" yaml:"timeseries_name,omitempty"`
}

TimeseriesSchema is the schema for a timeseries.

This includes the name of the timeseries, as well as the datum type of its metric and the schema for each field.

type TimeseriesSchemaResultsPage

type TimeseriesSchemaResultsPage struct {
	// Items is list of items on this page of results
	Items []TimeseriesSchema `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

TimeseriesSchemaResultsPage is a single page of results

type User

type User struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

User is client view of a [`User`]

type UserResultsPage

type UserResultsPage struct {
	// Items is list of items on this page of results
	Items []User `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

UserResultsPage is a single page of results

type UsersService added in v0.0.3

type UsersService service

func (*UsersService) Get added in v0.0.3

func (s *UsersService) Get(userName Name) (*User, error)

Fetch a specific built-in system user

Parameters:

  • `userName`

func (*UsersService) List added in v0.0.3

func (s *UsersService) List(limit int, pageToken string, sortBy NameSortMode) (*UserResultsPage, error)

List the built-in system users

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `pageToken`
  • `sortBy`

func (*UsersService) ListAllPages added in v0.0.3

func (s *UsersService) ListAllPages(sortBy NameSortMode) (*[]User, error)

ListAllPages

List the built-in system users

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `sortBy`

type VPC

type VPC struct {
	// Description is human-readable free-form text about a resource
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// DnsName is the name used for the VPC in DNS.
	DnsName Name `json:"dns_name,omitempty" yaml:"dns_name,omitempty"`
	// ID is unique, immutable, system-controlled identifier for each resource
	ID string `json:"id,omitempty" yaml:"id,omitempty"`
	// Name is unique, mutable, user-controlled identifier for each resource
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
	// ProjectID is id for the project containing this VPC
	ProjectID string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
	// SystemRouterID is id for the system router where subnet default routes are registered
	SystemRouterID string `json:"system_router_id,omitempty" yaml:"system_router_id,omitempty"`
	// TimeCreated is timestamp when this resource was created
	TimeCreated *time.Time `json:"time_created,omitempty" yaml:"time_created,omitempty"`
	// TimeModified is timestamp when this resource was last modified
	TimeModified *time.Time `json:"time_modified,omitempty" yaml:"time_modified,omitempty"`
}

VPC is client view of a [`Vpc`]

type VPCCreate

type VPCCreate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// DnsName is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	DnsName Name `json:"dns_name,omitempty" yaml:"dns_name,omitempty"`
	// Name is names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'.
	Name Name `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCCreate is create-time parameters for a [`Vpc`]

type VPCResultsPage

type VPCResultsPage struct {
	// Items is list of items on this page of results
	Items []VPC `json:"items,omitempty" yaml:"items,omitempty"`
	// NextPage is token used to fetch the next page of results (if any)
	NextPage string `json:"next_page,omitempty" yaml:"next_page,omitempty"`
}

VPCResultsPage is a single page of results

type VPCUpdate

type VPCUpdate struct {
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	DnsName     Name   `json:"dns_name,omitempty" yaml:"dns_name,omitempty"`
	Name        Name   `json:"name,omitempty" yaml:"name,omitempty"`
}

VPCUpdate is updateable properties of a [`Vpc`]

type VpcsService

type VpcsService service

func (*VpcsService) Create

func (s *VpcsService) Create(organizationName Name, projectName Name, j *VPCCreate) (*VPC, error)

Create a VPC in a project.

Parameters:

  • `organizationName`
  • `projectName`

func (*VpcsService) Delete

func (s *VpcsService) Delete(organizationName Name, projectName Name, vpcName Name) error

Delete

Delete a vpc from a project.

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*VpcsService) Get

func (s *VpcsService) Get(organizationName Name, projectName Name, vpcName Name) (*VPC, error)

Get

Get a VPC in a project.

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

func (*VpcsService) List

func (s *VpcsService) List(limit int, pageToken string, sortBy NameSortMode, organizationName Name, projectName Name) (*VPCResultsPage, error)

List

List VPCs in a project.

To iterate over all pages, use the `ListAllPages` method, instead.

Parameters:

  • `limit`
  • `organizationName`
  • `pageToken`
  • `projectName`
  • `sortBy`

func (*VpcsService) ListAllPages

func (s *VpcsService) ListAllPages(sortBy NameSortMode, organizationName Name, projectName Name) (*[]VPC, error)

ListAllPages

List VPCs in a project.

This method is a wrapper around the `List` method. This method returns all the pages at once.

Parameters:

  • `organizationName`
  • `projectName`
  • `sortBy`

func (*VpcsService) Put

func (s *VpcsService) Put(organizationName Name, projectName Name, vpcName Name, j *VPCUpdate) error

Put

Update a VPC.

Parameters:

  • `organizationName`
  • `projectName`
  • `vpcName`

Jump to

Keyboard shortcuts

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