schema

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Threads int

Functions

func GetThreads

func GetThreads() int

func SetThreads

func SetThreads(threads int)

Types

type OptionBlock

type OptionBlock map[string]string

func (OptionBlock) GetMetadata

func (o OptionBlock) GetMetadata(key string) (string, bool)

type Options

type Options []OptionBlock

type Provider

type Provider interface {
	Name() string
	ID() string
	Resources(ctx context.Context, cs goflags.StringSlice) (*Resources, error)
}

type Resource

type Resource struct {
	Public      bool   `json:"public"`
	Provider    string `json:"provider"`
	ID          string `json:"id,omitempty"`
	PublicIPv4  string `json:"public_ipv4,omitempty"`
	PrivateIpv4 string `json:"private_ipv4,omitempty"`
	DNSName     string `json:"dns_name,omitempty"`
}

type Resources

type Resources struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewResources

func NewResources() *Resources

func (*Resources) Append

func (r *Resources) Append(resource *Resource)

func (*Resources) AppendItem added in v1.0.1

func (r *Resources) AppendItem(item *Resource)

func (*Resources) GetItems added in v1.0.1

func (r *Resources) GetItems() []*Resource

func (*Resources) Merge

func (r *Resources) Merge(resources *Resources)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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