schema

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DBInstanceId  string `table:"ID"`
	Engine        string `table:"Engine"`
	EngineVersion string `table:"Version"`
	Region        string `table:"Region"`
	Address       string `table:"Address"`
}

type ErrNoSuchKey

type ErrNoSuchKey struct {
	Name string
}

ErrNoSuchKey means no such key exists in metadata.

func (*ErrNoSuchKey) Error

func (e *ErrNoSuchKey) Error() string

Error returns the value of the metadata key

type Host

type Host struct {
	PublicIPv4  string `table:"Public IP"`
	PrivateIpv4 string `table:"Private IP"`
	DNSName     string `table:"DNS Name"`
	Public      bool   `table:"Public"`
	Region      string `table:"Region"`
}

type Options

type Options map[string]string

Options contains configuration options for a provider

func (Options) GetMetadata added in v0.0.6

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

GetMetadata returns the value for a key if it exists.

type Provider

type Provider interface {
	// Name returns the name of the provider
	Name() string
	// Resources returns the provider for an resource deployment source.
	Resources(ctx context.Context) (*Resources, error)
	UserManagement(action, uname, pwd string)
	BucketDump(action, bucketname string)
}

Provider is an interface implemented by any cloud service provider.

It provides the bare minimum of methods to allow complete overview of user data.

type Resources

type Resources struct {
	Provider  string
	Hosts     []*Host
	Storages  []*Storage
	Users     []*User
	Databases []*Database
	Sms       Sms
}

func NewResources

func NewResources() *Resources

NewResources creates a new resources structure

type Sms added in v0.0.6

type Sms struct {
	Signs     []SmsSign
	Templates []SmsTemplate
	DailySize int64
}

type SmsSign added in v0.0.6

type SmsSign struct {
	Name   string `table:"Name"`
	Type   string `table:"Type"`
	Status string `table:"Status"`
}

type SmsTemplate added in v0.0.6

type SmsTemplate struct {
	Name    string `table:"Name"`
	Status  string `table:"Status"`
	Content string `table:"Content"`
}

type Storage

type Storage struct {
	BucketName  string `table:"Bucket"`
	AccountName string `table:"Storage Account"`
	Region      string `table:"Region"`
}

type User

type User struct {
	UserName    string `table:"User"`
	UserId      string `table:"ID"`
	EnableLogin bool   `table:"Enable Login"`
	LastLogin   string `table:"Last Login"`
	CreateTime  string `table:"Creat Time"`
}

Jump to

Keyboard shortcuts

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