common

package
v0.0.0-...-bfa9622 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCredentialError

func HandleCredentialError(err error, ctx context.ProviderCallContext)

HandleCredentialError marks the current credentials as invalid internally

if Oracle believes that they are expired

func IsAuthorisationFailure

func IsAuthorisationFailure(err error) bool

IsAuthorisationFailure reports whether the error is related to attempting to access the provider with invalid or expired credentials.

func NewComputeClient

func NewComputeClient(provider common.ConfigurationProvider) (*computeClient, error)

NewComputeClient returns a client which implements the OCIComputeClient interface.

func NewNetworkClient

func NewNetworkClient(provider common.ConfigurationProvider) (*networkClient, error)

NewNetworkClient returns a client which implements the OCINetworkingClient and OCIFirewallClient interfaces.

func NewStorageClient

func NewStorageClient(provider common.ConfigurationProvider) (*storageClient, error)

NewStorageClient returns a client which implements the OCIStorageClient interface.

func ValidateKey

func ValidateKey(key []byte, passphrase string) error

Types

type JujuConfigProvider

type JujuConfigProvider struct {
	Key         []byte
	Fingerprint string
	Passphrase  string
	Tenancy     string
	User        string
	OCIRegion   string
}

func (JujuConfigProvider) AuthType

func (j JujuConfigProvider) AuthType() (ociCommon.AuthConfig, error)

func (JujuConfigProvider) KeyFingerprint

func (j JujuConfigProvider) KeyFingerprint() (string, error)

func (JujuConfigProvider) KeyID

func (j JujuConfigProvider) KeyID() (string, error)

func (JujuConfigProvider) PrivateRSAKey

func (j JujuConfigProvider) PrivateRSAKey() (*rsa.PrivateKey, error)

func (JujuConfigProvider) Region

func (j JujuConfigProvider) Region() (string, error)

func (JujuConfigProvider) TenancyOCID

func (j JujuConfigProvider) TenancyOCID() (string, error)

func (JujuConfigProvider) UserOCID

func (j JujuConfigProvider) UserOCID() (string, error)

func (JujuConfigProvider) Validate

func (j JujuConfigProvider) Validate() error

type OCIVirtualNetworkingClient

type OCIVirtualNetworkingClient interface {
	CreateVcn(ctx context.Context, request ociCore.CreateVcnRequest) (ociCore.CreateVcnResponse, error)
	DeleteVcn(ctx context.Context, request ociCore.DeleteVcnRequest) (ociCore.DeleteVcnResponse, error)
	ListVcns(ctx context.Context, request ociCore.ListVcnsRequest) (ociCore.ListVcnsResponse, error)
	GetVcn(ctx context.Context, request ociCore.GetVcnRequest) (ociCore.GetVcnResponse, error)

	CreateSubnet(ctx context.Context, request ociCore.CreateSubnetRequest) (ociCore.CreateSubnetResponse, error)
	ListSubnets(ctx context.Context, request ociCore.ListSubnetsRequest) (ociCore.ListSubnetsResponse, error)
	DeleteSubnet(ctx context.Context, request ociCore.DeleteSubnetRequest) (ociCore.DeleteSubnetResponse, error)
	GetSubnet(ctx context.Context, request ociCore.GetSubnetRequest) (ociCore.GetSubnetResponse, error)

	CreateInternetGateway(ctx context.Context, request ociCore.CreateInternetGatewayRequest) (ociCore.CreateInternetGatewayResponse, error)
	GetInternetGateway(ctx context.Context, request ociCore.GetInternetGatewayRequest) (ociCore.GetInternetGatewayResponse, error)
	ListInternetGateways(ctx context.Context, request ociCore.ListInternetGatewaysRequest) (response ociCore.ListInternetGatewaysResponse, err error)
	DeleteInternetGateway(ctx context.Context, request ociCore.DeleteInternetGatewayRequest) (ociCore.DeleteInternetGatewayResponse, error)

	CreateRouteTable(ctx context.Context, request ociCore.CreateRouteTableRequest) (ociCore.CreateRouteTableResponse, error)
	GetRouteTable(ctx context.Context, request ociCore.GetRouteTableRequest) (ociCore.GetRouteTableResponse, error)
	DeleteRouteTable(ctx context.Context, request ociCore.DeleteRouteTableRequest) (ociCore.DeleteRouteTableResponse, error)
	ListRouteTables(ctx context.Context, request ociCore.ListRouteTablesRequest) (response ociCore.ListRouteTablesResponse, err error)

	GetVnic(ctx context.Context, request ociCore.GetVnicRequest) (ociCore.GetVnicResponse, error)

	CreateSecurityList(ctx context.Context, request ociCore.CreateSecurityListRequest) (ociCore.CreateSecurityListResponse, error)
	ListSecurityLists(ctx context.Context, request ociCore.ListSecurityListsRequest) (ociCore.ListSecurityListsResponse, error)
	DeleteSecurityList(ctx context.Context, request ociCore.DeleteSecurityListRequest) (ociCore.DeleteSecurityListResponse, error)
	GetSecurityList(ctx context.Context, request ociCore.GetSecurityListRequest) (ociCore.GetSecurityListResponse, error)
}

Jump to

Keyboard shortcuts

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