Help us shape the future of Go! Take the 2026 Go Developer Survey

apps

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SpecRegexes = &regexes{
		Name:   regexp.MustCompile(`^[a-z][a-z0-9-]{0,30}[a-z0-9]$`),
		Domain: regexp.MustCompile(`^((xn--)?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)+[a-zA-Z]{2,}\.?$`),
		Repo:   regexp.MustCompile(`^[^/]+/[^/]+$`),
		EnvKey: regexp.MustCompile(`^[_A-Za-z][_A-Za-z0-9]*$`),
	}

	RegistryTypes = &registryTypes{
		DOCR:       "DOCR",
		DOCKER_HUB: "DOCKER_HUB",
	}

	WorkloadTypes = &workloadTypes{
		ServiceType:    "Service",
		JobType:        "Job",
		StaticSiteType: "Static Site",
		WorkerType:     "Worker",
	}
)

Functions

This section is empty.

Types

type AppDiff

type AppDiff struct {
	Name string
	// contains filtered or unexported fields
}

func (*AppDiff) CalculateDiff

func (diff *AppDiff) CalculateDiff() ([]diffmatchpatch.Diff, error)

type AppLint added in v0.0.8

type AppLint struct {
	FileName string
	Name     string
	Errors   []error
}

type AppSpec

type AppSpec struct {
	*godo.AppSpec

	FileName string
	// contains filtered or unexported fields
}

func NewAppSpec added in v0.0.8

func NewAppSpec() *AppSpec

func (*AppSpec) SetDefaultValues

func (spec *AppSpec) SetDefaultValues()

func (*AppSpec) Validate added in v0.0.8

func (spec *AppSpec) Validate() []error

type AppStatus added in v0.0.5

type AppStatus struct {
	Name         string
	Status       DeploymentStatus
	DeploymentID string
	UpdatedAt    string
	URL          string
}

type Appfile

type Appfile struct {
	Spec     *AppfileSpec
	AppSpecs []*AppSpec
	State    *StateData
	// contains filtered or unexported fields
}

func NewAppfileFromAppSpec added in v0.0.6

func NewAppfileFromAppSpec(spec *AppSpec, token string) (*Appfile, error)

func NewAppfileFromSpec

func NewAppfileFromSpec(spec *AppfileSpec, envName string, token string) (*Appfile, error)

func (*Appfile) Destroy

func (appfile *Appfile) Destroy() error

func (*Appfile) Diff

func (appfile *Appfile) Diff() ([]*AppDiff, error)

func (*Appfile) Lint added in v0.0.8

func (appfile *Appfile) Lint() ([]AppLint, error)

func (*Appfile) Status added in v0.0.6

func (appfile *Appfile) Status() ([]*AppStatus, error)

func (*Appfile) Sync

func (appfile *Appfile) Sync() error

type AppfileSpec

type AppfileSpec struct {
	AppSpecs     []string            `yaml:"specs"`
	Environments map[string][]string `yaml:"environments"`
	// contains filtered or unexported fields
}

func (*AppfileSpec) IsValid added in v0.0.6

func (spec *AppfileSpec) IsValid() bool

func (*AppfileSpec) Path

func (spec *AppfileSpec) Path() string

func (*AppfileSpec) ReadEnvironment

func (spec *AppfileSpec) ReadEnvironment(name string) (*env.Environment, error)

func (*AppfileSpec) SetPath

func (spec *AppfileSpec) SetPath(path string) error

type DeploymentStatus added in v0.0.5

type DeploymentStatus string
const (
	DeploymentStatusUnknown    DeploymentStatus = "unknown"
	DeploymentStatusDeployed   DeploymentStatus = "deployed"
	DeploymentStatusInProgress DeploymentStatus = "in progress"
)

type EnvMetadata

type EnvMetadata struct {
	Name string
}

type StateData

type StateData struct {
	Environment EnvMetadata
	Values      map[string]interface{}
}

Jump to

Keyboard shortcuts

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