resources

package
v0.0.0-...-1a23c2c Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Client     *client.Client
	Identifier string
	Resource   *storage.Bucket
}

func NewBucket

func NewBucket(client *client.Client, identifier string) *Bucket

func (*Bucket) Create

func (b *Bucket) Create(ctx context.Context) error

func (*Bucket) Delete

func (b *Bucket) Delete(ctx context.Context) error

func (*Bucket) Read

func (b *Bucket) Read(ctx context.Context) error

func (*Bucket) Update

func (b *Bucket) Update(ctx context.Context) error

type Credentials

type Credentials struct {
	Client       *client.Client
	Identifier   string
	Dependencies struct {
		*Bucket
	}
	Resource *map[string]string
}

func NewCredentials

func NewCredentials(client *client.Client, identifier string, bucket *Bucket) *Credentials

func (*Credentials) Read

func (c *Credentials) Read(ctx context.Context) error

type DefaultNetwork

type DefaultNetwork struct {
	Client   *client.Client
	Resource *compute.Network
}

func NewDefaultNetwork

func NewDefaultNetwork(client *client.Client) *DefaultNetwork

func (*DefaultNetwork) Read

func (d *DefaultNetwork) Read(ctx context.Context) error

type FirewallRule

type FirewallRule struct {
	Client     *client.Client
	Identifier string
	Attributes struct {
		Rule      universal.FirewallRule
		Direction FirewallRuleDirection
		Action    FirewallRuleAction
		Priority  uint16
	}
	Dependencies struct {
		*DefaultNetwork
	}
	Resource *compute.Firewall
}

func NewFirewallRule

func NewFirewallRule(client *client.Client, identifier string, defaultNetwork *DefaultNetwork, rule universal.FirewallRule, direction FirewallRuleDirection, action FirewallRuleAction, priority uint16) *FirewallRule

func (*FirewallRule) Create

func (f *FirewallRule) Create(ctx context.Context) error

func (*FirewallRule) Delete

func (f *FirewallRule) Delete(ctx context.Context) error

func (*FirewallRule) Read

func (f *FirewallRule) Read(ctx context.Context) error

func (*FirewallRule) Update

func (f *FirewallRule) Update(ctx context.Context) error

type FirewallRuleAction

type FirewallRuleAction string
const (
	FirewallRuleActionDeny  FirewallRuleAction = "DENY"
	FirewallRuleActionAllow FirewallRuleAction = "ALLOW"
)

type FirewallRuleDirection

type FirewallRuleDirection string
const (
	FirewallRuleDirectionIngress FirewallRuleDirection = "INGRESS"
	FirewallRuleDirectionEgress  FirewallRuleDirection = "EGRESS"
)

type Image

type Image struct {
	Client     *client.Client
	Identifier string
	Attributes struct {
		SSHUser string
	}
	Resource *compute.Image
}

func NewImage

func NewImage(client *client.Client, identifier string) *Image

func (*Image) Read

func (i *Image) Read(ctx context.Context) error

type InstanceGroupManager

type InstanceGroupManager struct {
	Client     *client.Client
	Identifier string
	Attributes struct {
		Parallelism uint16
		Addresses   []net.IP
		Status      map[string]int
		Events      []universal.Event
	}
	Dependencies struct {
		*InstanceTemplate
	}
	Resource *compute.InstanceGroupManager
}

func NewInstanceGroupManager

func NewInstanceGroupManager(client *client.Client, identifier string, instanceTemplate *InstanceTemplate, parallelism uint16) *InstanceGroupManager

func (*InstanceGroupManager) Create

func (i *InstanceGroupManager) Create(ctx context.Context) error

func (*InstanceGroupManager) Delete

func (i *InstanceGroupManager) Delete(ctx context.Context) error

func (*InstanceGroupManager) Read

func (*InstanceGroupManager) Update

func (i *InstanceGroupManager) Update(ctx context.Context) error

type InstanceTemplate

type InstanceTemplate struct {
	Client       *client.Client
	Identifier   string
	Attributes   universal.Task
	Dependencies struct {
		*DefaultNetwork
		FirewallRules []*FirewallRule
		*Image
		*Credentials
	}
	Resource *compute.InstanceTemplate
}

func NewInstanceTemplate

func NewInstanceTemplate(client *client.Client, identifier string, defaultNetwork *DefaultNetwork, firewallRules []*FirewallRule, image *Image, credentials *Credentials, task universal.Task) *InstanceTemplate

func (*InstanceTemplate) Create

func (i *InstanceTemplate) Create(ctx context.Context) error

func (*InstanceTemplate) Delete

func (i *InstanceTemplate) Delete(ctx context.Context) error

func (*InstanceTemplate) Read

func (i *InstanceTemplate) Read(ctx context.Context) error

func (*InstanceTemplate) Update

func (i *InstanceTemplate) Update(ctx context.Context) error

Jump to

Keyboard shortcuts

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