schema

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 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 {
	InstanceId    string `table:"ID"`
	Engine        string `table:"Engine"`
	EngineVersion string `table:"Version"`
	Region        string `table:"Region"`
	Address       string `table:"Address"`
	NetworkType   string `table:"NetworkType"`
	DBNames       string `table:"DBName"`
}

type Domain added in v0.0.9

type Domain struct {
	DomainName string
	Records    []Record
}

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 Event added in v0.0.9

type Event struct {
	Id        string
	Name      string
	Affected  string
	API       string
	Status    string
	SourceIp  string `table:"Source IP"`
	AccessKey string
	Time      string
}

type Host

type Host struct {
	HostName    string `table:"HostName"`
	ID          string `table:"Instance ID"`
	PublicIPv4  string `table:"Public IP"`
	PrivateIpv4 string `table:"Private IP"`
	OSType      string `table:"OS Type"`
	DNSName     string `table:"DNS Name"`
	Public      bool   `table:"Public"`
	Region      string `table:"Region"`
}

type Log added in v0.1.2

type Log struct {
	ProjectName    string `table:"Project Name"`
	Region         string
	Description    string
	LastModifyTime string
}

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(ctx context.Context, action, bucketname string)
	EventDump(action, sourceIp string)
	ExecuteCloudVMCommand(instanceId, cmd string)
	DBManagement(action, args 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 Record added in v0.0.9

type Record struct {
	RR     string
	Type   string
	Value  string
	Status string
}

type Resources

type Resources struct {
	Provider  string
	Hosts     []Host
	Storages  []Storage
	Users     []User
	Databases []Database
	Domains   []Domain
	Sms       Sms
	Logs      []Log
}

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"`
	Policies    string `table:"Policies"`
	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