fabric

package module
v0.0.0-...-f5b2e84 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(n int) []byte

Bytes generates n random bytes

func GetContext

func GetContext(path string) io.Reader

func PushImage

func PushImage(ctx context.Context, serviceName string, config *Config) error

func String

func String(n int, letters ...string) string

String generates a random string using only letters provided in the letters parameter if user ommit letters parameters, this function will use defLetters instead

Types

type ArtifactoryService

type ArtifactoryService struct {
	// contains filtered or unexported fields
}

func NewArtifactoryService

func NewArtifactoryService(config *Config) *ArtifactoryService

func (*ArtifactoryService) Close

func (as *ArtifactoryService) Close() error

func (*ArtifactoryService) CreateArtifactory

func (a *ArtifactoryService) CreateArtifactory(ctx context.Context) error

type Config

type Config struct {
	Organization Organization
	Creds        Creds
}

func NewConfig

func NewConfig() *Config

func (*Config) GetLocation

func (c *Config) GetLocation(service *Service) string

func (*Config) GetLocationByRegion

func (c *Config) GetLocationByRegion(region string) string

func (*Config) GetService

func (c *Config) GetService(serviceName string) (*Service, error)

func (*Config) GetSqlInstanceTier

func (c *Config) GetSqlInstanceTier(service *Service) string

func (*Config) ImageFullPath

func (c *Config) ImageFullPath(service *Service) string

func (*Config) RepoBasePath

func (c *Config) RepoBasePath() string

func (*Config) RepoFullPath

func (c *Config) RepoFullPath() string

func (*Config) ServicePath

func (c *Config) ServicePath(service *Service) string

type Creds

type Creds struct {
	ProjectId string `json:"project_id"`
}

type Database

type Database struct {
	Name    string
	Dialect string
	Version int
	Vcpu    int
	Memory  int64
}

type Organization

type Organization struct {
	Name      string
	Credsfile string
	Services  []struct {
		Service Service
	}
}

type RunService

type RunService struct {
	// contains filtered or unexported fields
}

func NewRunService

func NewRunService(config *Config) *RunService

func (*RunService) Close

func (run *RunService) Close() error

func (*RunService) CreateRunService

func (run *RunService) CreateRunService(ctx context.Context, service *Service) error

func (*RunService) DeleteRunService

func (run *RunService) DeleteRunService(ctx context.Context, service *Service) error

func (*RunService) DeployServiceSequence

func (run *RunService) DeployServiceSequence(ctx context.Context, service *Service) (*string, error)

func (*RunService) GetRunService

func (run *RunService) GetRunService(ctx context.Context, service *Service) (*runpb.Service, error)

func (*RunService) ListDeployedServices

func (run *RunService) ListDeployedServices(ctx context.Context, region string) ([]*runpb.Service, error)

func (*RunService) SetIamPolicy

func (run *RunService) SetIamPolicy(ctx context.Context, service *Service) error

func (*RunService) UpsertRunService

func (run *RunService) UpsertRunService(ctx context.Context, service *Service) error

type Service

type Service struct {
	Name     string
	Context  string
	Region   string
	Public   bool
	Database Database
}

func (*Service) GenRevisionString

func (s *Service) GenRevisionString() string

type SqlService

type SqlService struct {
	// contains filtered or unexported fields
}

func NewSqlService

func NewSqlService(config *Config) *SqlService

func (*SqlService) CreateSqlInstance

func (s *SqlService) CreateSqlInstance(ctx context.Context, service *Service) error

func (*SqlService) ListSqlInstances

func (s *SqlService) ListSqlInstances(ctx context.Context) ([]*sql.DatabaseInstance, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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