Documentation
¶
Index ¶
- Constants
- Variables
- type APIError
- type AttachVnicIn
- type AttachVolumeIn
- type BackupPolicyAssignment
- type BackupSchedule
- type Base
- type BootVolume
- type BootVolumeAttachment
- type BwOpts
- type ConfigProvider
- type CreateAssignmentIn
- type CreateBootVolumeIn
- type CreateDhcpOptionsIn
- type CreateImageIn
- type CreateInternetGatewayIn
- type CreateLpgIn
- type CreateNatGatewayIn
- type CreateNsgIn
- type CreatePrivateIPIn
- type CreatePublicIPIn
- type CreateRouteTableIn
- type CreateSecurityListIn
- type CreateServiceGatewayIn
- type CreateSubnetIn
- type CreateVcnIn
- type CreateVnicIn
- type CreateVolumeBackupIn
- type CreateVolumeBackupPolicyIn
- type CreateVolumeIn
- type DhcpOption
- type DhcpOptions
- type EgressRule
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- type IcmpOptions
- type Image
- type ImageListOpts
- type InMemoryBackend
- func (b *InMemoryBackend) AddSecurityRules(id string, in SecurityRulesIn) (SecurityRulesOut, *APIError)
- func (b *InMemoryBackend) AttachService(id, ifMatch string, in ServiceIDIn) (resource, string, *APIError)
- func (b *InMemoryBackend) AttachVnic(in AttachVnicIn) (resource, string, *APIError)
- func (b *InMemoryBackend) AttachVolume(in AttachVolumeIn) (resource, string, *APIError)
- func (b *InMemoryBackend) ConnectLocalPeeringGateways(id, peerID, ifMatch string) *APIError
- func (b *InMemoryBackend) CreateBootVolume(in CreateBootVolumeIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateDhcpOptions(in CreateDhcpOptionsIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateImage(in CreateImageIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateInternetGateway(in CreateInternetGatewayIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateLocalPeeringGateway(in CreateLpgIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateNatGateway(in CreateNatGatewayIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateNetworkSecurityGroup(in CreateNsgIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreatePrivateIP(in CreatePrivateIPIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreatePublicIP(in CreatePublicIPIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateRouteTable(in CreateRouteTableIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateSecurityList(in CreateSecurityListIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateServiceGateway(in CreateServiceGatewayIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateSubnet(in CreateSubnetIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateVcn(in CreateVcnIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateVolume(in CreateVolumeIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateVolumeBackup(in CreateVolumeBackupIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateVolumeBackupPolicy(in CreateVolumeBackupPolicyIn) (resource, string, *APIError)
- func (b *InMemoryBackend) CreateVolumeBackupPolicyAssignment(in CreateAssignmentIn) (resource, string, *APIError)
- func (b *InMemoryBackend) DeleteImage(id, ifMatch string) *APIError
- func (b *InMemoryBackend) DeletePrivateIP(id, ifMatch string) *APIError
- func (b *InMemoryBackend) DeleteVolumeBackupPolicy(id, ifMatch string) *APIError
- func (b *InMemoryBackend) DeleteVolumeBackupPolicyAssignment(id, ifMatch string) *APIError
- func (b *InMemoryBackend) DetachService(id, ifMatch string, in ServiceIDIn) (resource, string, *APIError)
- func (b *InMemoryBackend) DetachVnic(id, ifMatch string) *APIError
- func (b *InMemoryBackend) DetachVolume(id, ifMatch string) *APIError
- func (b *InMemoryBackend) Fqdn(privateIPID string) string
- func (b *InMemoryBackend) GetImage(id string) (resource, string, *APIError)
- func (b *InMemoryBackend) GetService(id string) (Service, *APIError)
- func (b *InMemoryBackend) GetVolumeBackupPolicy(id string) (resource, string, *APIError)
- func (b *InMemoryBackend) InstanceAction(id, action, ifMatch string) (resource, string, *APIError)
- func (b *InMemoryBackend) LaunchInstance(in LaunchInstanceIn) (resource, string, *APIError)
- func (b *InMemoryBackend) ListImages(o ImageListOpts) (page.Page[resource], *APIError)
- func (b *InMemoryBackend) ListNsgVnics(id string, o ListOpts) (page.Page[NsgVnic], *APIError)
- func (b *InMemoryBackend) ListPolicyAssignments(assetID, pageToken string, limit int) (page.Page[resource], *APIError)
- func (b *InMemoryBackend) ListPrivateIPs(o PrivateIPListOpts) (page.Page[resource], *APIError)
- func (b *InMemoryBackend) ListSecurityRules(id string, o RuleListOpts) (page.Page[SecurityRule], *APIError)
- func (b *InMemoryBackend) ListServices(pageToken string, limit int) (page.Page[Service], *APIError)
- func (b *InMemoryBackend) ListShapes(compartment, imageID, name, pageToken string, limit int) (page.Page[Shape], *APIError)
- func (b *InMemoryBackend) ListVolumeBackupPolicies(compartment, pageToken string, limit int) (page.Page[resource], *APIError)
- func (b *InMemoryBackend) PublicIPByAddress(addr string) (resource, string, *APIError)
- func (b *InMemoryBackend) RemoveSecurityRules(id string, ids []string) *APIError
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SetClock(now func() time.Time)
- func (b *InMemoryBackend) SetCompartmentChecker(fn func(string) bool)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) Sweep()
- func (b *InMemoryBackend) TerminateInstance(id, ifMatch string, preserveBoot bool) *APIError
- func (b *InMemoryBackend) UpdateBootVolume(id, ifMatch string, in UpdateVolumeIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateDhcpOptions(id, ifMatch string, in UpdateDhcpOptionsIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateImage(id, ifMatch string, in UpdateIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateInstance(id, ifMatch string, in UpdateInstanceIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateInternetGateway(id, ifMatch string, in UpdateInternetGatewayIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateLocalPeeringGateway(id, ifMatch string, in UpdateLpgIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateNatGateway(id, ifMatch string, in UpdateNatGatewayIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateNetworkSecurityGroup(id, ifMatch string, in UpdateIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdatePrivateIP(id, ifMatch string, in UpdatePrivateIPIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdatePublicIP(id, ifMatch string, in UpdatePublicIPIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateRouteTable(id, ifMatch string, in UpdateRouteTableIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateSecurityList(id, ifMatch string, in UpdateSecurityListIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateSecurityRules(id string, in SecurityRulesIn) (SecurityRulesOut, *APIError)
- func (b *InMemoryBackend) UpdateServiceGateway(id, ifMatch string, in UpdateServiceGatewayIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateSubnet(id, ifMatch string, in UpdateSubnetIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateVcn(id, ifMatch string, in UpdateVcnIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateVnic(id, ifMatch string, in UpdateVnicIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateVolume(id, ifMatch string, in UpdateVolumeIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateVolumeBackup(id, ifMatch string, in UpdateIn) (resource, string, *APIError)
- func (b *InMemoryBackend) UpdateVolumeBackupPolicy(id, ifMatch string, in UpdateVolumeBackupPolicyIn) (resource, string, *APIError)
- type IngressRule
- type Instance
- type InstanceShapeConfig
- type Internal
- type InternetGateway
- type LaunchInstanceIn
- type ListOpts
- type LocalPeeringGateway
- type MemOpts
- type MinMax
- type NSGRule
- type NatGateway
- type NetworkSecurityGroup
- type NsgVnic
- type PortOptions
- type PortRange
- type PrivateIP
- type PrivateIPListOpts
- type Provider
- type PublicIP
- type RouteRule
- type RouteTable
- type RuleListOpts
- type SecurityList
- type SecurityRule
- type SecurityRuleIn
- type SecurityRulesIn
- type SecurityRulesOut
- type Service
- type ServiceGateway
- type ServiceIDIn
- type ServiceRef
- type Settings
- type Shape
- type ShapeConfigIn
- type SourceDetails
- type Subnet
- type TagsIn
- type UpdateDhcpOptionsIn
- type UpdateIn
- type UpdateInstanceIn
- type UpdateInternetGatewayIn
- type UpdateLpgIn
- type UpdateNatGatewayIn
- type UpdatePrivateIPIn
- type UpdatePublicIPIn
- type UpdateRouteTableIn
- type UpdateSecurityListIn
- type UpdateServiceGatewayIn
- type UpdateSubnetIn
- type UpdateVcnIn
- type UpdateVnicIn
- type UpdateVolumeBackupPolicyIn
- type UpdateVolumeIn
- type Vcn
- type Vnic
- type VnicAttachment
- type Volume
- type VolumeAttachment
- type VolumeBackup
- type VolumeBackupPolicy
- type VolumeSource
Constants ¶
const DefaultPort = 8155
DefaultPort is the dedicated listener's default TCP port.
const (
// RegionKey is the three letter key of the emulated region.
RegionKey = "iad"
)
Variables ¶
var ErrNilAppContext = errors.New("ocicore: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
var ErrSnapshotNull = errors.New("ocicore: null entry in snapshot")
ErrSnapshotNull is returned when a snapshot contains a null entry.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError is an OCI error response: HTTP status plus the `code` and `message` body fields.
type AttachVnicIn ¶
type AttachVnicIn struct {
CreateVnicDetails *CreateVnicIn `json:"createVnicDetails"`
NicIndex *int `json:"nicIndex"`
DisplayName string `json:"displayName"`
InstanceID string `json:"instanceId"`
}
AttachVnicIn is the AttachVnic request body.
type AttachVolumeIn ¶
type AttachVolumeIn struct {
IsReadOnly *bool `json:"isReadOnly"`
UseChap *bool `json:"useChap"`
IsPvEncryptionInTransit *bool `json:"isPvEncryptionInTransitEnabled"`
IsAgentAutoIscsiLoginEnabled *bool `json:"isAgentAutoIscsiLoginEnabled"`
Type string `json:"type"`
InstanceID string `json:"instanceId"`
VolumeID string `json:"volumeId"`
Device string `json:"device"`
DisplayName string `json:"displayName"`
}
AttachVolumeIn is the AttachVolume request body (type iscsi or paravirtualized).
type BackupPolicyAssignment ¶
type BackupPolicyAssignment struct {
Base
AssetID string `json:"assetId"`
PolicyID string `json:"policyId"`
}
BackupPolicyAssignment assigns a policy to a volume or boot volume.
type BackupSchedule ¶
type BackupSchedule struct {
BackupType string `json:"backupType"`
Period string `json:"period"`
OffsetType string `json:"offsetType,omitempty"`
DayOfWeek string `json:"dayOfWeek,omitempty"`
Month string `json:"month,omitempty"`
TimeZone string `json:"timeZone,omitempty"`
RetentionSeconds int `json:"retentionSeconds"`
OffsetSeconds int `json:"offsetSeconds,omitempty"`
HourOfDay int `json:"hourOfDay,omitempty"`
DayOfMonth int `json:"dayOfMonth,omitempty"`
}
BackupSchedule is one schedule of a volume backup policy.
type Base ¶
type Base struct {
TimeCreated time.Time `json:"timeCreated"`
FreeformTags map[string]string `json:"freeformTags"`
DefinedTags map[string]map[string]any `json:"definedTags"`
Internal *Internal `json:"internal,omitempty"`
ID string `json:"id"`
CompartmentID string `json:"compartmentId"`
DisplayName string `json:"displayName"`
LifecycleState string `json:"lifecycleState"`
}
Base is the field set every Core networking resource shares.
type BootVolume ¶
type BootVolume struct {
SourceDetails *VolumeSource `json:"sourceDetails,omitempty"`
Base
AvailabilityDomain string `json:"availabilityDomain"`
ImageID string `json:"imageId,omitempty"`
KmsKeyID string `json:"kmsKeyId,omitempty"`
SizeInMBs int64 `json:"sizeInMBs"`
SizeInGBs int64 `json:"sizeInGBs"`
VpusPerGB int64 `json:"vpusPerGB"`
IsHydrated bool `json:"isHydrated"`
IsAutoTuneEnabled bool `json:"isAutoTuneEnabled"`
}
BootVolume is an instance boot volume.
type BootVolumeAttachment ¶
type BootVolumeAttachment struct {
Base
AvailabilityDomain string `json:"availabilityDomain"`
BootVolumeID string `json:"bootVolumeId"`
InstanceID string `json:"instanceId"`
}
BootVolumeAttachment links a boot volume to an instance.
type BwOpts ¶
type BwOpts struct {
MinInGbps float64 `json:"minInGbps"`
MaxInGbps float64 `json:"maxInGbps"`
DefaultPerOcpuInGbps float64 `json:"defaultPerOcpuInGbps"`
}
BwOpts are the networking bandwidth options of a flexible shape.
type ConfigProvider ¶
type ConfigProvider interface {
GetOCICoreSettings() Settings
}
ConfigProvider extracts OCI Core Services configuration from the AppContext Config.
type CreateAssignmentIn ¶
type CreateAssignmentIn struct {
AssetID string `json:"assetId"`
PolicyID string `json:"policyId"`
}
CreateAssignmentIn is the CreateVolumeBackupPolicyAssignment request body.
type CreateBootVolumeIn ¶
type CreateBootVolumeIn struct {
TagsIn
SizeInGBs *int64 `json:"sizeInGBs"`
VpusPerGB *int64 `json:"vpusPerGB"`
SourceDetails *VolumeSource `json:"sourceDetails"`
CompartmentID string `json:"compartmentId"`
AvailabilityDomain string `json:"availabilityDomain"`
DisplayName string `json:"displayName"`
KmsKeyID string `json:"kmsKeyId"`
}
CreateBootVolumeIn is the CreateBootVolume request body.
type CreateDhcpOptionsIn ¶
type CreateDhcpOptionsIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
DomainNameType string `json:"domainNameType"`
Options []DhcpOption `json:"options"`
}
CreateDhcpOptionsIn is the CreateDhcpOptions request body.
type CreateImageIn ¶
type CreateImageIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
DisplayName string `json:"displayName"`
InstanceID string `json:"instanceId"`
LaunchMode string `json:"launchMode"`
}
CreateImageIn is the CreateImage request body.
type CreateInternetGatewayIn ¶
type CreateInternetGatewayIn struct {
TagsIn
IsEnabled *bool `json:"isEnabled"`
CompartmentID string `json:"compartmentId"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
RouteTableID string `json:"routeTableId"`
}
CreateInternetGatewayIn is the CreateInternetGateway request body.
type CreateLpgIn ¶
type CreateLpgIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
RouteTableID string `json:"routeTableId"`
}
CreateLpgIn is the CreateLocalPeeringGateway request body.
type CreateNatGatewayIn ¶
type CreateNatGatewayIn struct {
TagsIn
BlockTraffic *bool `json:"blockTraffic"`
CompartmentID string `json:"compartmentId"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
PublicIPID string `json:"publicIpId"`
RouteTableID string `json:"routeTableId"`
}
CreateNatGatewayIn is the CreateNatGateway request body.
type CreateNsgIn ¶
type CreateNsgIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
}
CreateNsgIn is the CreateNetworkSecurityGroup request body.
type CreatePrivateIPIn ¶
type CreatePrivateIPIn struct {
TagsIn
DisplayName string `json:"displayName"`
HostnameLabel string `json:"hostnameLabel"`
IPAddress string `json:"ipAddress"`
Lifetime string `json:"lifetime"`
SubnetID string `json:"subnetId"`
VnicID string `json:"vnicId"`
VlanID string `json:"vlanId"`
}
CreatePrivateIPIn is the CreatePrivateIp request body.
type CreatePublicIPIn ¶
type CreatePublicIPIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
DisplayName string `json:"displayName"`
Lifetime string `json:"lifetime"`
PrivateIPID string `json:"privateIpId"`
PublicIPPoolID string `json:"publicIpPoolId"`
}
CreatePublicIPIn is the CreatePublicIp request body.
type CreateRouteTableIn ¶
type CreateRouteTableIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
RouteRules []RouteRule `json:"routeRules"`
}
CreateRouteTableIn is the CreateRouteTable request body.
type CreateSecurityListIn ¶
type CreateSecurityListIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
IngressRules []IngressRule `json:"ingressSecurityRules"`
EgressRules []EgressRule `json:"egressSecurityRules"`
}
CreateSecurityListIn is the CreateSecurityList request body.
type CreateServiceGatewayIn ¶
type CreateServiceGatewayIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
RouteTableID string `json:"routeTableId"`
Services []ServiceIDIn `json:"services"`
}
CreateServiceGatewayIn is the CreateServiceGateway request body.
type CreateSubnetIn ¶
type CreateSubnetIn struct {
TagsIn
ProhibitInternetIngress *bool `json:"prohibitInternetIngress"`
ProhibitPublicIPOnVnic *bool `json:"prohibitPublicIpOnVnic"`
DhcpOptionsID string `json:"dhcpOptionsId"`
AvailabilityDomain string `json:"availabilityDomain"`
CidrBlock string `json:"cidrBlock"`
VcnID string `json:"vcnId"`
DisplayName string `json:"displayName"`
DNSLabel string `json:"dnsLabel"`
Ipv6CidrBlock string `json:"ipv6CidrBlock"`
RouteTableID string `json:"routeTableId"`
CompartmentID string `json:"compartmentId"`
Ipv4CidrBlocks []string `json:"ipv4CidrBlocks"`
SecurityListIDs []string `json:"securityListIds"`
}
CreateSubnetIn is the CreateSubnet request body.
type CreateVcnIn ¶
type CreateVcnIn struct {
TagsIn
IsIpv6Enabled *bool `json:"isIpv6Enabled"`
CompartmentID string `json:"compartmentId"`
DisplayName string `json:"displayName"`
CidrBlock string `json:"cidrBlock"`
DNSLabel string `json:"dnsLabel"`
CidrBlocks []string `json:"cidrBlocks"`
Ipv6PrivateCidrs []string `json:"ipv6PrivateCidrBlocks"`
}
CreateVcnIn is the CreateVcn request body.
type CreateVnicIn ¶
type CreateVnicIn struct {
TagsIn
AssignPublicIP *bool `json:"assignPublicIp"`
AssignIpv6IP *bool `json:"assignIpv6Ip"`
SkipSourceDestCheck *bool `json:"skipSourceDestCheck"`
DisplayName string `json:"displayName"`
HostnameLabel string `json:"hostnameLabel"`
PrivateIP string `json:"privateIp"`
SubnetID string `json:"subnetId"`
VlanID string `json:"vlanId"`
NsgIDs []string `json:"nsgIds"`
}
CreateVnicIn is createVnicDetails.
type CreateVolumeBackupIn ¶
type CreateVolumeBackupIn struct {
TagsIn
DisplayName string `json:"displayName"`
Type string `json:"type"`
VolumeID string `json:"volumeId"`
KmsKeyID string `json:"kmsKeyId"`
}
CreateVolumeBackupIn is the CreateVolumeBackup request body.
type CreateVolumeBackupPolicyIn ¶
type CreateVolumeBackupPolicyIn struct {
TagsIn
CompartmentID string `json:"compartmentId"`
DisplayName string `json:"displayName"`
DestinationRegion string `json:"destinationRegion"`
Schedules []BackupSchedule `json:"schedules"`
}
CreateVolumeBackupPolicyIn is the CreateVolumeBackupPolicy request body.
type CreateVolumeIn ¶
type CreateVolumeIn struct {
TagsIn
SizeInGBs *int64 `json:"sizeInGBs"`
SizeInMBs *int64 `json:"sizeInMBs"`
VpusPerGB *int64 `json:"vpusPerGB"`
IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"`
SourceDetails *VolumeSource `json:"sourceDetails"`
AvailabilityDomain string `json:"availabilityDomain"`
CompartmentID string `json:"compartmentId"`
DisplayName string `json:"displayName"`
KmsKeyID string `json:"kmsKeyId"`
VolumeBackupID string `json:"volumeBackupId"`
BackupPolicyID string `json:"backupPolicyId"`
AutotunePolicies []any `json:"autotunePolicies"`
BlockVolumeReplicas []any `json:"blockVolumeReplicas"`
}
CreateVolumeIn is the CreateVolume request body.
type DhcpOption ¶
type DhcpOption struct {
Type string `json:"type"`
ServerType string `json:"serverType,omitempty"`
CustomDNSServers []string `json:"customDnsServers,omitempty"`
SearchDomainNames []string `json:"searchDomainNames,omitempty"`
}
DhcpOption is one DHCP option; Type selects the populated fields.
type DhcpOptions ¶
type DhcpOptions struct {
Base
VcnID string `json:"vcnId"`
DomainNameType string `json:"domainNameType,omitempty"`
Options []DhcpOption `json:"options"`
}
DhcpOptions is a set of DHCP options.
type EgressRule ¶
type EgressRule struct {
IcmpOptions *IcmpOptions `json:"icmpOptions,omitempty"`
TCPOptions *PortOptions `json:"tcpOptions,omitempty"`
UDPOptions *PortOptions `json:"udpOptions,omitempty"`
IsStateless *bool `json:"isStateless,omitempty"`
Protocol string `json:"protocol"`
Destination string `json:"destination"`
DestinationType string `json:"destinationType,omitempty"`
Description string `json:"description,omitempty"`
}
EgressRule is a security list egress rule.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
Port int
EnforceAuth bool
// contains filtered or unexported fields
}
Handler serves OCI Core Services (core API 20160918): networking, compute and block storage control plane.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a Handler; callers override Port and EnforceAuth from Settings.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the operation name for metrics.
func (*Handler) ExtractResource ¶
ExtractResource returns the addressed resource id for metrics.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations lists the supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler for all OCI Core Services requests.
func (*Handler) MatchPriority ¶
MatchPriority is irrelevant because RouteMatcher never matches.
func (*Handler) RouteMatcher ¶
RouteMatcher never matches: OCI Core Services runs on its own listener.
type IcmpOptions ¶
IcmpOptions are ICMP match options.
type Image ¶
type Image struct {
Base
OperatingSystem string `json:"operatingSystem"`
OperatingSystemVersion string `json:"operatingSystemVersion"`
BaseImageID string `json:"baseImageId,omitempty"`
LaunchMode string `json:"launchMode"`
ListingType string `json:"listingType"`
SizeInMBs int64 `json:"sizeInMBs"`
BillableSizeInGBs int64 `json:"billableSizeInGBs"`
CreateImageAllowed bool `json:"createImageAllowed"`
}
Image is a platform or custom image.
type ImageListOpts ¶
type ImageListOpts struct {
Compartment, Name, OS, OSVersion, Shape, State, SortBy, Order, Page string
Limit int
}
ImageListOpts are the ListImages filters.
type InMemoryBackend ¶
type InMemoryBackend struct {
// Auth is the API-key registry shared with the other OCI services.
Auth *ociauth.Registry
// contains filtered or unexported fields
}
InMemoryBackend holds all Core networking state under one lock.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates an empty backend.
func (*InMemoryBackend) AddSecurityRules ¶
func (b *InMemoryBackend) AddSecurityRules(id string, in SecurityRulesIn) (SecurityRulesOut, *APIError)
AddSecurityRules adds rules to an NSG; either all are added or none.
func (*InMemoryBackend) AttachService ¶
func (b *InMemoryBackend) AttachService(id, ifMatch string, in ServiceIDIn) (resource, string, *APIError)
AttachService adds a service to a service gateway.
func (*InMemoryBackend) AttachVnic ¶
func (b *InMemoryBackend) AttachVnic(in AttachVnicIn) (resource, string, *APIError)
AttachVnic attaches a new secondary VNIC to an instance.
func (*InMemoryBackend) AttachVolume ¶
func (b *InMemoryBackend) AttachVolume(in AttachVolumeIn) (resource, string, *APIError)
AttachVolume attaches a block volume to an instance.
func (*InMemoryBackend) ConnectLocalPeeringGateways ¶
func (b *InMemoryBackend) ConnectLocalPeeringGateways(id, peerID, ifMatch string) *APIError
ConnectLocalPeeringGateways peers a gateway with another one in a different VCN.
func (*InMemoryBackend) CreateBootVolume ¶
func (b *InMemoryBackend) CreateBootVolume(in CreateBootVolumeIn) (resource, string, *APIError)
CreateBootVolume clones an existing boot volume.
func (*InMemoryBackend) CreateDhcpOptions ¶
func (b *InMemoryBackend) CreateDhcpOptions(in CreateDhcpOptionsIn) (resource, string, *APIError)
CreateDhcpOptions creates a DHCP options set.
func (*InMemoryBackend) CreateImage ¶
func (b *InMemoryBackend) CreateImage(in CreateImageIn) (resource, string, *APIError)
CreateImage captures a custom image from an instance's boot volume.
func (*InMemoryBackend) CreateInternetGateway ¶
func (b *InMemoryBackend) CreateInternetGateway(in CreateInternetGatewayIn) (resource, string, *APIError)
CreateInternetGateway creates an internet gateway.
func (*InMemoryBackend) CreateLocalPeeringGateway ¶
func (b *InMemoryBackend) CreateLocalPeeringGateway(in CreateLpgIn) (resource, string, *APIError)
CreateLocalPeeringGateway creates a local peering gateway.
func (*InMemoryBackend) CreateNatGateway ¶
func (b *InMemoryBackend) CreateNatGateway(in CreateNatGatewayIn) (resource, string, *APIError)
CreateNatGateway creates a NAT gateway backed by a reserved or newly allocated public IP.
func (*InMemoryBackend) CreateNetworkSecurityGroup ¶
func (b *InMemoryBackend) CreateNetworkSecurityGroup(in CreateNsgIn) (resource, string, *APIError)
CreateNetworkSecurityGroup creates an NSG.
func (*InMemoryBackend) CreatePrivateIP ¶
func (b *InMemoryBackend) CreatePrivateIP(in CreatePrivateIPIn) (resource, string, *APIError)
CreatePrivateIP adds a secondary private IP to a VNIC, or reserves one in a subnet.
func (*InMemoryBackend) CreatePublicIP ¶
func (b *InMemoryBackend) CreatePublicIP(in CreatePublicIPIn) (resource, string, *APIError)
CreatePublicIP allocates a reserved public IP, or an ephemeral one for a private IP.
func (*InMemoryBackend) CreateRouteTable ¶
func (b *InMemoryBackend) CreateRouteTable(in CreateRouteTableIn) (resource, string, *APIError)
CreateRouteTable creates a route table.
func (*InMemoryBackend) CreateSecurityList ¶
func (b *InMemoryBackend) CreateSecurityList(in CreateSecurityListIn) (resource, string, *APIError)
CreateSecurityList creates a security list.
func (*InMemoryBackend) CreateServiceGateway ¶
func (b *InMemoryBackend) CreateServiceGateway(in CreateServiceGatewayIn) (resource, string, *APIError)
CreateServiceGateway creates a service gateway.
func (*InMemoryBackend) CreateSubnet ¶
func (b *InMemoryBackend) CreateSubnet(in CreateSubnetIn) (resource, string, *APIError)
CreateSubnet creates a subnet in a VCN.
func (*InMemoryBackend) CreateVcn ¶
func (b *InMemoryBackend) CreateVcn(in CreateVcnIn) (resource, string, *APIError)
CreateVcn creates a VCN with its default route table, security list and DHCP options.
func (*InMemoryBackend) CreateVolume ¶
func (b *InMemoryBackend) CreateVolume(in CreateVolumeIn) (resource, string, *APIError)
CreateVolume creates a block volume, optionally from a volume or backup.
func (*InMemoryBackend) CreateVolumeBackup ¶
func (b *InMemoryBackend) CreateVolumeBackup(in CreateVolumeBackupIn) (resource, string, *APIError)
CreateVolumeBackup snapshots a volume; the first backup of a volume is always FULL.
func (*InMemoryBackend) CreateVolumeBackupPolicy ¶
func (b *InMemoryBackend) CreateVolumeBackupPolicy(in CreateVolumeBackupPolicyIn) (resource, string, *APIError)
CreateVolumeBackupPolicy stores a user defined policy; its schedules are never executed.
func (*InMemoryBackend) CreateVolumeBackupPolicyAssignment ¶
func (b *InMemoryBackend) CreateVolumeBackupPolicyAssignment(in CreateAssignmentIn) (resource, string, *APIError)
CreateVolumeBackupPolicyAssignment assigns a policy to a volume or boot volume (one policy per asset).
func (*InMemoryBackend) DeleteImage ¶
func (b *InMemoryBackend) DeleteImage(id, ifMatch string) *APIError
DeleteImage deletes a custom image; platform images cannot be deleted.
func (*InMemoryBackend) DeletePrivateIP ¶
func (b *InMemoryBackend) DeletePrivateIP(id, ifMatch string) *APIError
DeletePrivateIP deletes a secondary private IP.
func (*InMemoryBackend) DeleteVolumeBackupPolicy ¶
func (b *InMemoryBackend) DeleteVolumeBackupPolicy(id, ifMatch string) *APIError
DeleteVolumeBackupPolicy deletes a user defined policy that has no assignments.
func (*InMemoryBackend) DeleteVolumeBackupPolicyAssignment ¶
func (b *InMemoryBackend) DeleteVolumeBackupPolicyAssignment(id, ifMatch string) *APIError
DeleteVolumeBackupPolicyAssignment removes an assignment.
func (*InMemoryBackend) DetachService ¶
func (b *InMemoryBackend) DetachService(id, ifMatch string, in ServiceIDIn) (resource, string, *APIError)
DetachService removes a service from a service gateway.
func (*InMemoryBackend) DetachVnic ¶
func (b *InMemoryBackend) DetachVnic(id, ifMatch string) *APIError
DetachVnic detaches and deletes a secondary VNIC.
func (*InMemoryBackend) DetachVolume ¶
func (b *InMemoryBackend) DetachVolume(id, ifMatch string) *APIError
DetachVolume detaches a volume from an instance.
func (*InMemoryBackend) Fqdn ¶
func (b *InMemoryBackend) Fqdn(privateIPID string) string
Fqdn returns the fully qualified domain name of a private IP's hostname, or "" without a hostname label.
func (*InMemoryBackend) GetImage ¶
func (b *InMemoryBackend) GetImage(id string) (resource, string, *APIError)
GetImage returns a platform or custom image.
func (*InMemoryBackend) GetService ¶
func (b *InMemoryBackend) GetService(id string) (Service, *APIError)
GetService returns one service.
func (*InMemoryBackend) GetVolumeBackupPolicy ¶
func (b *InMemoryBackend) GetVolumeBackupPolicy(id string) (resource, string, *APIError)
GetVolumeBackupPolicy returns a predefined or user defined policy.
func (*InMemoryBackend) InstanceAction ¶
func (b *InMemoryBackend) InstanceAction(id, action, ifMatch string) (resource, string, *APIError)
InstanceAction applies a power action.
func (*InMemoryBackend) LaunchInstance ¶
func (b *InMemoryBackend) LaunchInstance(in LaunchInstanceIn) (resource, string, *APIError)
LaunchInstance creates an instance with its boot volume and primary VNIC.
func (*InMemoryBackend) ListImages ¶
func (b *InMemoryBackend) ListImages(o ImageListOpts) (page.Page[resource], *APIError)
ListImages lists platform images plus the custom images of a compartment.
func (*InMemoryBackend) ListNsgVnics ¶
ListNsgVnics lists the VNICs that are members of a network security group.
func (*InMemoryBackend) ListPolicyAssignments ¶
func (b *InMemoryBackend) ListPolicyAssignments(assetID, pageToken string, limit int) (page.Page[resource], *APIError)
ListPolicyAssignments lists the policy assignments of an asset.
func (*InMemoryBackend) ListPrivateIPs ¶
func (b *InMemoryBackend) ListPrivateIPs(o PrivateIPListOpts) (page.Page[resource], *APIError)
ListPrivateIPs lists private IPs by VNIC, or by subnet and address.
func (*InMemoryBackend) ListSecurityRules ¶
func (b *InMemoryBackend) ListSecurityRules(id string, o RuleListOpts) (page.Page[SecurityRule], *APIError)
ListSecurityRules lists the rules of an NSG.
func (*InMemoryBackend) ListServices ¶
ListServices lists the Oracle services available to service gateways.
func (*InMemoryBackend) ListShapes ¶
func (b *InMemoryBackend) ListShapes( compartment, imageID, name, pageToken string, limit int, ) (page.Page[Shape], *APIError)
ListShapes lists the compute shapes, optionally only those compatible with an image.
func (*InMemoryBackend) ListVolumeBackupPolicies ¶
func (b *InMemoryBackend) ListVolumeBackupPolicies( compartment, pageToken string, limit int, ) (page.Page[resource], *APIError)
ListVolumeBackupPolicies lists the predefined policies plus the custom ones of a compartment.
func (*InMemoryBackend) PublicIPByAddress ¶
func (b *InMemoryBackend) PublicIPByAddress(addr string) (resource, string, *APIError)
PublicIPByAddress finds a public IP by its address.
func (*InMemoryBackend) RemoveSecurityRules ¶
func (b *InMemoryBackend) RemoveSecurityRules(id string, ids []string) *APIError
RemoveSecurityRules removes NSG rules by id; either all are removed or none.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all state and the registered API keys.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a snapshot.
func (*InMemoryBackend) SetClock ¶
func (b *InMemoryBackend) SetClock(now func() time.Time)
SetClock injects the time source used for lifecycle transitions.
func (*InMemoryBackend) SetCompartmentChecker ¶
func (b *InMemoryBackend) SetCompartmentChecker(fn func(string) bool)
SetCompartmentChecker makes compartmentId arguments validated against another service (OCI Identity).
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state, including registered API keys.
func (*InMemoryBackend) Sweep ¶
func (b *InMemoryBackend) Sweep()
Sweep applies due lifecycle transitions and purges long-terminated resources.
func (*InMemoryBackend) TerminateInstance ¶
func (b *InMemoryBackend) TerminateInstance(id, ifMatch string, preserveBoot bool) *APIError
TerminateInstance starts termination of an instance and releases everything attached to it.
func (*InMemoryBackend) UpdateBootVolume ¶
func (b *InMemoryBackend) UpdateBootVolume(id, ifMatch string, in UpdateVolumeIn) (resource, string, *APIError)
UpdateBootVolume changes a boot volume.
func (*InMemoryBackend) UpdateDhcpOptions ¶
func (b *InMemoryBackend) UpdateDhcpOptions(id, ifMatch string, in UpdateDhcpOptionsIn) (resource, string, *APIError)
UpdateDhcpOptions changes a DHCP options set.
func (*InMemoryBackend) UpdateImage ¶
func (b *InMemoryBackend) UpdateImage(id, ifMatch string, in UpdateIn) (resource, string, *APIError)
UpdateImage changes a custom image.
func (*InMemoryBackend) UpdateInstance ¶
func (b *InMemoryBackend) UpdateInstance(id, ifMatch string, in UpdateInstanceIn) (resource, string, *APIError)
UpdateInstance changes an instance; a different shape or shape configuration needs a stopped instance.
func (*InMemoryBackend) UpdateInternetGateway ¶
func (b *InMemoryBackend) UpdateInternetGateway( id, ifMatch string, in UpdateInternetGatewayIn, ) (resource, string, *APIError)
UpdateInternetGateway changes an internet gateway.
func (*InMemoryBackend) UpdateLocalPeeringGateway ¶
func (b *InMemoryBackend) UpdateLocalPeeringGateway(id, ifMatch string, in UpdateLpgIn) (resource, string, *APIError)
UpdateLocalPeeringGateway changes a local peering gateway.
func (*InMemoryBackend) UpdateNatGateway ¶
func (b *InMemoryBackend) UpdateNatGateway(id, ifMatch string, in UpdateNatGatewayIn) (resource, string, *APIError)
UpdateNatGateway changes a NAT gateway.
func (*InMemoryBackend) UpdateNetworkSecurityGroup ¶
func (b *InMemoryBackend) UpdateNetworkSecurityGroup(id, ifMatch string, in UpdateIn) (resource, string, *APIError)
UpdateNetworkSecurityGroup changes an NSG's name and tags.
func (*InMemoryBackend) UpdatePrivateIP ¶
func (b *InMemoryBackend) UpdatePrivateIP(id, ifMatch string, in UpdatePrivateIPIn) (resource, string, *APIError)
UpdatePrivateIP changes a private IP, or moves it to another VNIC of the same subnet.
func (*InMemoryBackend) UpdatePublicIP ¶
func (b *InMemoryBackend) UpdatePublicIP(id, ifMatch string, in UpdatePublicIPIn) (resource, string, *APIError)
UpdatePublicIP changes a public IP's name and tags, and assigns, moves or unassigns a reserved one.
func (*InMemoryBackend) UpdateRouteTable ¶
func (b *InMemoryBackend) UpdateRouteTable(id, ifMatch string, in UpdateRouteTableIn) (resource, string, *APIError)
UpdateRouteTable changes a route table; routeRules replaces the whole list.
func (*InMemoryBackend) UpdateSecurityList ¶
func (b *InMemoryBackend) UpdateSecurityList( id, ifMatch string, in UpdateSecurityListIn, ) (resource, string, *APIError)
UpdateSecurityList changes a security list; rule lists replace the existing ones.
func (*InMemoryBackend) UpdateSecurityRules ¶
func (b *InMemoryBackend) UpdateSecurityRules(id string, in SecurityRulesIn) (SecurityRulesOut, *APIError)
UpdateSecurityRules replaces existing NSG rules by id; either all are updated or none.
func (*InMemoryBackend) UpdateServiceGateway ¶
func (b *InMemoryBackend) UpdateServiceGateway( id, ifMatch string, in UpdateServiceGatewayIn, ) (resource, string, *APIError)
UpdateServiceGateway changes a service gateway; services replaces the attached list.
func (*InMemoryBackend) UpdateSubnet ¶
func (b *InMemoryBackend) UpdateSubnet(id, ifMatch string, in UpdateSubnetIn) (resource, string, *APIError)
UpdateSubnet changes a subnet's name, tags and associations.
func (*InMemoryBackend) UpdateVcn ¶
func (b *InMemoryBackend) UpdateVcn(id, ifMatch string, in UpdateVcnIn) (resource, string, *APIError)
UpdateVcn changes a VCN's name and tags.
func (*InMemoryBackend) UpdateVnic ¶
func (b *InMemoryBackend) UpdateVnic(id, ifMatch string, in UpdateVnicIn) (resource, string, *APIError)
UpdateVnic changes a VNIC.
func (*InMemoryBackend) UpdateVolume ¶
func (b *InMemoryBackend) UpdateVolume(id, ifMatch string, in UpdateVolumeIn) (resource, string, *APIError)
UpdateVolume changes a volume; the size can only grow.
func (*InMemoryBackend) UpdateVolumeBackup ¶
func (b *InMemoryBackend) UpdateVolumeBackup(id, ifMatch string, in UpdateIn) (resource, string, *APIError)
UpdateVolumeBackup changes a backup's name and tags.
func (*InMemoryBackend) UpdateVolumeBackupPolicy ¶
func (b *InMemoryBackend) UpdateVolumeBackupPolicy( id, ifMatch string, in UpdateVolumeBackupPolicyIn, ) (resource, string, *APIError)
UpdateVolumeBackupPolicy changes a user defined policy.
type IngressRule ¶
type IngressRule struct {
IcmpOptions *IcmpOptions `json:"icmpOptions,omitempty"`
TCPOptions *PortOptions `json:"tcpOptions,omitempty"`
UDPOptions *PortOptions `json:"udpOptions,omitempty"`
IsStateless *bool `json:"isStateless,omitempty"`
Protocol string `json:"protocol"`
Source string `json:"source"`
SourceType string `json:"sourceType,omitempty"`
Description string `json:"description,omitempty"`
}
IngressRule is a security list ingress rule.
type Instance ¶
type Instance struct {
Metadata map[string]string `json:"metadata"`
InstanceOptions map[string]any `json:"instanceOptions,omitempty"`
AvailabilityConfig map[string]any `json:"availabilityConfig,omitempty"`
LaunchOptions map[string]any `json:"launchOptions,omitempty"`
AgentConfig map[string]any `json:"agentConfig,omitempty"`
ExtendedMetadata map[string]any `json:"extendedMetadata"`
ShapeConfig *InstanceShapeConfig `json:"shapeConfig,omitempty"`
SourceDetails *SourceDetails `json:"sourceDetails,omitempty"`
Base
Region string `json:"region"`
LaunchMode string `json:"launchMode"`
ImageID string `json:"imageId,omitempty"`
Shape string `json:"shape"`
FaultDomain string `json:"faultDomain"`
AvailabilityDomain string `json:"availabilityDomain"`
}
Instance is a compute instance; only its control plane state exists.
type InstanceShapeConfig ¶
type InstanceShapeConfig struct {
ProcessorDescription string `json:"processorDescription,omitempty"`
Ocpus float64 `json:"ocpus"`
MemoryInGBs float64 `json:"memoryInGBs"`
Vcpus int `json:"vcpus"`
NetworkingBandwidthInGbps float64 `json:"networkingBandwidthInGbps"`
MaxVnicAttachments int `json:"maxVnicAttachments"`
}
InstanceShapeConfig is the resolved shape configuration of an instance.
type Internal ¶
type Internal struct {
TransitionAt *time.Time `json:"transitionAt,omitempty"`
TimeDeleted *time.Time `json:"timeDeleted,omitempty"`
Etag string `json:"etag"`
NextState string `json:"nextState,omitempty"`
Arch string `json:"arch,omitempty"`
Seq int64 `json:"seq"`
}
Internal is bookkeeping that never reaches the wire.
type InternetGateway ¶
type InternetGateway struct {
Base
VcnID string `json:"vcnId"`
RouteTableID string `json:"routeTableId,omitempty"`
IsEnabled bool `json:"isEnabled"`
}
InternetGateway is an internet gateway.
type LaunchInstanceIn ¶
type LaunchInstanceIn struct {
TagsIn
CreateVnicDetails *CreateVnicIn `json:"createVnicDetails"`
ShapeConfig *ShapeConfigIn `json:"shapeConfig"`
SourceDetails *SourceDetails `json:"sourceDetails"`
Metadata map[string]string `json:"metadata"`
ExtendedMetadata map[string]any `json:"extendedMetadata"`
AgentConfig map[string]any `json:"agentConfig"`
LaunchOptions map[string]any `json:"launchOptions"`
AvailabilityConfig map[string]any `json:"availabilityConfig"`
InstanceOptions map[string]any `json:"instanceOptions"`
AvailabilityDomain string `json:"availabilityDomain"`
CompartmentID string `json:"compartmentId"`
DisplayName string `json:"displayName"`
FaultDomain string `json:"faultDomain"`
HostnameLabel string `json:"hostnameLabel"`
ImageID string `json:"imageId"`
Shape string `json:"shape"`
SubnetID string `json:"subnetId"`
LaunchVolumeAttachments []json.RawMessage `json:"launchVolumeAttachments"`
}
LaunchInstanceIn is the LaunchInstance request body.
type ListOpts ¶
type ListOpts struct {
Match func(resource) bool
Compartment string
DisplayName string
State string
VcnID string
SortBy string
Order string
Page string
Limit int
}
ListOpts carries the shared list query parameters.
type LocalPeeringGateway ¶
type LocalPeeringGateway struct {
Base
VcnID string `json:"vcnId"`
PeerID string `json:"peerId,omitempty"`
PeeringStatus string `json:"peeringStatus"`
PeeringStatusDetails string `json:"peeringStatusDetails,omitempty"`
PeerAdvertisedCidr string `json:"peerAdvertisedCidr,omitempty"`
RouteTableID string `json:"routeTableId,omitempty"`
PeerAdvertisedDetails []string `json:"peerAdvertisedCidrDetails,omitempty"`
IsCrossTenancyPeering bool `json:"isCrossTenancyPeering"`
}
LocalPeeringGateway is a local peering gateway.
type MemOpts ¶
type MemOpts struct {
MinInGBs float64 `json:"minInGBs"`
MaxInGBs float64 `json:"maxInGBs"`
DefaultPerOcpuInGBs float64 `json:"defaultPerOcpuInGBs"`
MinPerOcpuInGBs float64 `json:"minPerOcpuInGBs"`
MaxPerOcpuInGBs float64 `json:"maxPerOcpuInGBs"`
}
MemOpts are the memory options of a flexible shape.
type NSGRule ¶
type NSGRule struct {
NsgID string `json:"nsgId"`
SecurityRule
Seq int64 `json:"seq"`
}
NSGRule is a stored network security group rule.
type NatGateway ¶
type NatGateway struct {
Base
VcnID string `json:"vcnId"`
NatIP string `json:"natIp"`
PublicIPID string `json:"publicIpId,omitempty"`
RouteTableID string `json:"routeTableId,omitempty"`
BlockTraffic bool `json:"blockTraffic"`
}
NatGateway is a NAT gateway.
type NetworkSecurityGroup ¶
NetworkSecurityGroup is a network security group.
type NsgVnic ¶
type NsgVnic struct {
TimeAssociated time.Time `json:"timeAssociated"`
VnicID string `json:"vnicId"`
ResourceID string `json:"resourceId"`
}
NsgVnic is one entry of ListNetworkSecurityGroupVnics.
type PortOptions ¶
type PortOptions struct {
DestinationPortRange *PortRange `json:"destinationPortRange,omitempty"`
SourcePortRange *PortRange `json:"sourcePortRange,omitempty"`
}
PortOptions are TCP or UDP match options.
type PrivateIP ¶
type PrivateIP struct {
Base
AvailabilityDomain string `json:"availabilityDomain,omitempty"`
HostnameLabel string `json:"hostnameLabel,omitempty"`
IPAddress string `json:"ipAddress"`
IPState string `json:"ipState"`
Lifetime string `json:"lifetime"`
SubnetID string `json:"subnetId"`
VnicID string `json:"vnicId,omitempty"`
IsPrimary bool `json:"isPrimary"`
}
PrivateIP is a private IP address on a VNIC (or an unassigned reserved one).
type PrivateIPListOpts ¶
type PrivateIPListOpts struct {
IPAddress, SubnetID, VnicID, IPState, Lifetime, Page string
Limit int
}
PrivateIPListOpts are the ListPrivateIps filters.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for OCI Core Services. It runs on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init creates the backend and handler; the port is bound in StartWorker.
type PublicIP ¶
type PublicIP struct {
Base
IPAddress string `json:"ipAddress"`
Lifetime string `json:"lifetime"`
Scope string `json:"scope"`
AssignedEntityID string `json:"assignedEntityId,omitempty"`
AssignedEntityType string `json:"assignedEntityType,omitempty"`
AvailabilityDomain *string `json:"availabilityDomain"`
PrivateIPID string `json:"privateIpId,omitempty"`
PublicIPPoolID string `json:"publicIpPoolId,omitempty"`
}
PublicIP is a public IP address.
type RouteRule ¶
type RouteRule struct {
CidrBlock string `json:"cidrBlock,omitempty"`
Destination string `json:"destination,omitempty"`
DestinationType string `json:"destinationType,omitempty"`
NetworkEntityID string `json:"networkEntityId"`
RouteType string `json:"routeType,omitempty"`
Description string `json:"description,omitempty"`
}
RouteRule is one route table rule.
type RouteTable ¶
type RouteTable struct {
Base
VcnID string `json:"vcnId"`
RouteRules []RouteRule `json:"routeRules"`
}
RouteTable is a route table.
type RuleListOpts ¶
RuleListOpts carries the ListNetworkSecurityGroupSecurityRules query.
type SecurityList ¶
type SecurityList struct {
Base
VcnID string `json:"vcnId"`
IngressRules []IngressRule `json:"ingressSecurityRules"`
EgressRules []EgressRule `json:"egressSecurityRules"`
}
SecurityList is a security list.
type SecurityRule ¶
type SecurityRule struct {
TimeCreated time.Time `json:"timeCreated"`
IcmpOptions *IcmpOptions `json:"icmpOptions,omitempty"`
TCPOptions *PortOptions `json:"tcpOptions,omitempty"`
UDPOptions *PortOptions `json:"udpOptions,omitempty"`
IsStateless *bool `json:"isStateless,omitempty"`
ID string `json:"id"`
Direction string `json:"direction"`
Protocol string `json:"protocol"`
Source string `json:"source,omitempty"`
SourceType string `json:"sourceType,omitempty"`
Destination string `json:"destination,omitempty"`
DestinationType string `json:"destinationType,omitempty"`
Description string `json:"description,omitempty"`
IsValid bool `json:"isValid"`
}
SecurityRule is a network security group rule.
type SecurityRuleIn ¶
type SecurityRuleIn struct {
IcmpOptions *IcmpOptions `json:"icmpOptions"`
TCPOptions *PortOptions `json:"tcpOptions"`
UDPOptions *PortOptions `json:"udpOptions"`
IsStateless *bool `json:"isStateless"`
ID string `json:"id"`
Direction string `json:"direction"`
Protocol string `json:"protocol"`
Source string `json:"source"`
SourceType string `json:"sourceType"`
Destination string `json:"destination"`
DestinationType string `json:"destinationType"`
Description string `json:"description"`
}
SecurityRuleIn is a rule in an add or update call.
type SecurityRulesIn ¶
type SecurityRulesIn struct {
SecurityRules []SecurityRuleIn `json:"securityRules"`
}
SecurityRulesIn is the body of the add and update security rule calls.
type SecurityRulesOut ¶
type SecurityRulesOut struct {
SecurityRules []SecurityRule `json:"securityRules"`
}
SecurityRulesOut is the result of the add and update security rule calls.
type Service ¶
type Service struct {
CidrBlock string `json:"cidrBlock"`
Description string `json:"description"`
ID string `json:"id"`
Name string `json:"name"`
}
Service is an Oracle service reachable through a service gateway.
type ServiceGateway ¶
type ServiceGateway struct {
Base
VcnID string `json:"vcnId"`
RouteTableID string `json:"routeTableId,omitempty"`
Services []ServiceRef `json:"services"`
BlockTraffic bool `json:"blockTraffic"`
}
ServiceGateway is a service gateway.
type ServiceIDIn ¶
type ServiceIDIn struct {
ServiceID string `json:"serviceId"`
}
ServiceIDIn names a service in a request body.
type ServiceRef ¶
type ServiceRef struct {
ServiceID string `json:"serviceId"`
ServiceName string `json:"serviceName"`
}
ServiceRef names a service attached to a service gateway.
type Settings ¶
type Settings struct {
Port int `` //nolint:lll // config struct tags are intentionally verbose
/* 198-byte string literal not displayed */
EnforceAuth bool `` //nolint:lll // config struct tags are intentionally verbose
/* 220-byte string literal not displayed */
}
Settings holds service-level configuration, embedded in the root CLI as CLI.OCICore.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns the settings used when no ConfigProvider is available.
type Shape ¶
type Shape struct {
OcpuOptions *MinMax `json:"ocpuOptions,omitempty"`
MemoryOptions *MemOpts `json:"memoryOptions,omitempty"`
NetworkingBandwidthOptions *BwOpts `json:"networkingBandwidthOptions,omitempty"`
Shape string `json:"shape"`
ProcessorDescription string `json:"processorDescription"`
BillingType string `json:"billingType"`
ResizeCompatibleShapes []string `json:"resizeCompatibleShapes,omitempty"`
Ocpus float64 `json:"ocpus"`
MemoryInGBs float64 `json:"memoryInGBs"`
NetworkingBandwidthInGbps float64 `json:"networkingBandwidthInGbps"`
MaxVnicAttachments int `json:"maxVnicAttachments"`
IsFlexible bool `json:"isFlexible"`
}
Shape is one entry of ListShapes.
type ShapeConfigIn ¶
type ShapeConfigIn struct {
Ocpus *float64 `json:"ocpus"`
MemoryInGBs *float64 `json:"memoryInGBs"`
Vcpus *int `json:"vcpus"`
}
ShapeConfigIn is the shapeConfig of LaunchInstance and UpdateInstance.
type SourceDetails ¶
type SourceDetails struct {
SourceType string `json:"sourceType"`
ImageID string `json:"imageId,omitempty"`
BootVolumeID string `json:"bootVolumeId,omitempty"`
BootVolumeSizeInGBs *int64 `json:"bootVolumeSizeInGBs,omitempty"`
BootVolumeVpusPerGB *int64 `json:"bootVolumeVpusPerGB,omitempty"`
KmsKeyID string `json:"kmsKeyId,omitempty"`
}
SourceDetails is the polymorphic instance source (sourceType image or bootVolume).
type Subnet ¶
type Subnet struct {
Base
VcnID string `json:"vcnId"`
AvailabilityDomain *string `json:"availabilityDomain"`
CidrBlock string `json:"cidrBlock"`
DhcpOptionsID string `json:"dhcpOptionsId"`
DNSLabel string `json:"dnsLabel,omitempty"`
SubnetDomainName string `json:"subnetDomainName,omitempty"`
Ipv6CidrBlock string `json:"ipv6CidrBlock,omitempty"`
Ipv6VirtualRouterIP string `json:"ipv6VirtualRouterIp,omitempty"`
RouteTableID string `json:"routeTableId"`
VirtualRouterIP string `json:"virtualRouterIp"`
VirtualRouterMac string `json:"virtualRouterMac"`
Ipv4CidrBlocks []string `json:"ipv4CidrBlocks"`
Ipv6CidrBlocks []string `json:"ipv6CidrBlocks,omitempty"`
SecurityListIDs []string `json:"securityListIds"`
ProhibitInternetIngress bool `json:"prohibitInternetIngress"`
ProhibitPublicIPOnVnic bool `json:"prohibitPublicIpOnVnic"`
}
Subnet is a subnet of a VCN.
type TagsIn ¶
type TagsIn struct {
FreeformTags map[string]string `json:"freeformTags"`
DefinedTags map[string]map[string]any `json:"definedTags"`
}
TagsIn carries the tags accepted by create and update calls.
type UpdateDhcpOptionsIn ¶
type UpdateDhcpOptionsIn struct {
Options *[]DhcpOption `json:"options"`
DomainNameType *string `json:"domainNameType"`
UpdateIn
}
UpdateDhcpOptionsIn is the UpdateDhcpOptions request body.
type UpdateInstanceIn ¶
type UpdateInstanceIn struct {
Shape *string `json:"shape"`
ShapeConfig *ShapeConfigIn `json:"shapeConfig"`
Metadata map[string]string `json:"metadata"`
ExtendedMetadata map[string]any `json:"extendedMetadata"`
AgentConfig map[string]any `json:"agentConfig"`
UpdateIn
}
UpdateInstanceIn is the UpdateInstance request body.
type UpdateInternetGatewayIn ¶
type UpdateInternetGatewayIn struct {
IsEnabled *bool `json:"isEnabled"`
RouteTableID *string `json:"routeTableId"`
UpdateIn
}
UpdateInternetGatewayIn is the UpdateInternetGateway request body.
type UpdateLpgIn ¶
UpdateLpgIn is the UpdateLocalPeeringGateway request body.
type UpdateNatGatewayIn ¶
type UpdateNatGatewayIn struct {
BlockTraffic *bool `json:"blockTraffic"`
RouteTableID *string `json:"routeTableId"`
UpdateIn
}
UpdateNatGatewayIn is the UpdateNatGateway request body.
type UpdatePrivateIPIn ¶
type UpdatePrivateIPIn struct {
HostnameLabel *string `json:"hostnameLabel"`
VnicID *string `json:"vnicId"`
Lifetime *string `json:"lifetime"`
UpdateIn
}
UpdatePrivateIPIn is the UpdatePrivateIp request body.
type UpdatePublicIPIn ¶
UpdatePublicIPIn is the UpdatePublicIp request body.
type UpdateRouteTableIn ¶
UpdateRouteTableIn is the UpdateRouteTable request body.
type UpdateSecurityListIn ¶
type UpdateSecurityListIn struct {
IngressRules *[]IngressRule `json:"ingressSecurityRules"`
EgressRules *[]EgressRule `json:"egressSecurityRules"`
UpdateIn
}
UpdateSecurityListIn is the UpdateSecurityList request body.
type UpdateServiceGatewayIn ¶
type UpdateServiceGatewayIn struct {
BlockTraffic *bool `json:"blockTraffic"`
RouteTableID *string `json:"routeTableId"`
Services *[]ServiceIDIn `json:"services"`
UpdateIn
}
UpdateServiceGatewayIn is the UpdateServiceGateway request body.
type UpdateSubnetIn ¶
type UpdateSubnetIn struct {
DhcpOptionsID *string `json:"dhcpOptionsId"`
RouteTableID *string `json:"routeTableId"`
CidrBlock *string `json:"cidrBlock"`
SecurityListIDs *[]string `json:"securityListIds"`
UpdateIn
}
UpdateSubnetIn is the UpdateSubnet request body.
type UpdateVnicIn ¶
type UpdateVnicIn struct {
HostnameLabel *string `json:"hostnameLabel"`
SkipSourceDestCheck *bool `json:"skipSourceDestCheck"`
NsgIDs *[]string `json:"nsgIds"`
UpdateIn
}
UpdateVnicIn is the UpdateVnic request body.
type UpdateVolumeBackupPolicyIn ¶
type UpdateVolumeBackupPolicyIn struct {
Schedules *[]BackupSchedule `json:"schedules"`
UpdateIn
}
UpdateVolumeBackupPolicyIn is the UpdateVolumeBackupPolicy request body.
type UpdateVolumeIn ¶
type UpdateVolumeIn struct {
SizeInGBs *int64 `json:"sizeInGBs"`
VpusPerGB *int64 `json:"vpusPerGB"`
IsAutoTuneEnabled *bool `json:"isAutoTuneEnabled"`
UpdateIn
}
UpdateVolumeIn is the UpdateVolume request body.
type Vcn ¶
type Vcn struct {
Base
CidrBlock string `json:"cidrBlock"`
DefaultDhcpOptionsID string `json:"defaultDhcpOptionsId"`
DefaultRouteTableID string `json:"defaultRouteTableId"`
DefaultSecurityList string `json:"defaultSecurityListId"`
DNSLabel string `json:"dnsLabel,omitempty"`
VcnDomainName string `json:"vcnDomainName,omitempty"`
CidrBlocks []string `json:"cidrBlocks"`
Ipv6CidrBlocks []string `json:"ipv6CidrBlocks,omitempty"`
Ipv6PrivateCidrs []string `json:"ipv6PrivateCidrBlocks,omitempty"`
}
Vcn is a virtual cloud network.
type Vnic ¶
type Vnic struct {
Base
AvailabilityDomain string `json:"availabilityDomain"`
HostnameLabel string `json:"hostnameLabel,omitempty"`
MacAddress string `json:"macAddress"`
PrivateIP string `json:"privateIp"`
PublicIP string `json:"publicIp,omitempty"`
SubnetID string `json:"subnetId"`
NsgIDs []string `json:"nsgIds"`
IsPrimary bool `json:"isPrimary"`
SkipSourceDestCheck bool `json:"skipSourceDestCheck"`
}
Vnic is a virtual network interface card.
type VnicAttachment ¶
type VnicAttachment struct {
Base
AvailabilityDomain string `json:"availabilityDomain"`
InstanceID string `json:"instanceId"`
SubnetID string `json:"subnetId"`
VnicID string `json:"vnicId"`
NicIndex int `json:"nicIndex"`
VlanTag int `json:"vlanTag"`
}
VnicAttachment links a VNIC to an instance.
type Volume ¶
type Volume struct {
SourceDetails *VolumeSource `json:"sourceDetails,omitempty"`
Base
AvailabilityDomain string `json:"availabilityDomain"`
KmsKeyID string `json:"kmsKeyId,omitempty"`
SizeInMBs int64 `json:"sizeInMBs"`
SizeInGBs int64 `json:"sizeInGBs"`
VpusPerGB int64 `json:"vpusPerGB"`
IsHydrated bool `json:"isHydrated"`
IsAutoTuneEnabled bool `json:"isAutoTuneEnabled"`
}
Volume is a block volume.
type VolumeAttachment ¶
type VolumeAttachment struct {
Base
AttachmentType string `json:"attachmentType"`
AvailabilityDomain string `json:"availabilityDomain"`
InstanceID string `json:"instanceId"`
VolumeID string `json:"volumeId"`
Device string `json:"device,omitempty"`
IscsiLoginState string `json:"iscsiLoginState,omitempty"`
Ipv4 string `json:"ipv4,omitempty"`
Iqn string `json:"iqn,omitempty"`
ChapUsername string `json:"chapUsername,omitempty"`
ChapSecret string `json:"chapSecret,omitempty"`
EncryptionInTransitType string `json:"encryptionInTransitType"`
Port int `json:"port,omitempty"`
IsReadOnly bool `json:"isReadOnly"`
IsMultipath bool `json:"isMultipath"`
IsPvEncryptionInTransit bool `json:"isPvEncryptionInTransitEnabled"`
IsAgentAutoIscsiLoginEnabled bool `json:"isAgentAutoIscsiLoginEnabled,omitempty"`
}
VolumeAttachment is an iSCSI or paravirtualized volume attachment (attachmentType).
type VolumeBackup ¶
type VolumeBackup struct {
TimeRequestReceived time.Time `json:"timeRequestReceived"`
Base
Type string `json:"type"`
SourceType string `json:"sourceType"`
VolumeID string `json:"volumeId"`
KmsKeyID string `json:"kmsKeyId,omitempty"`
SizeInMBs int64 `json:"sizeInMBs"`
SizeInGBs int64 `json:"sizeInGBs"`
UniqueSizeInGBs int64 `json:"uniqueSizeInGBs"`
UniqueSizeInMbs int64 `json:"uniqueSizeInMbs"`
}
VolumeBackup is a block volume backup.
type VolumeBackupPolicy ¶
type VolumeBackupPolicy struct {
Base
DestinationRegion string `json:"destinationRegion,omitempty"`
Schedules []BackupSchedule `json:"schedules"`
}
VolumeBackupPolicy is a predefined or user defined backup policy; schedules are stored, never executed.
type VolumeSource ¶
VolumeSource is the polymorphic volume source (type volume, volumeBackup or bootVolume).