manifest

package
v0.9.21 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContext

func BuildContext(path string, insts []*api.Installation) error

func ContextPath

func ContextPath() string

func ManifestPath

func ManifestPath(repo string) (string, error)

func ProjectManifestPath

func ProjectManifestPath() string

Types

type Bundle

type Bundle struct {
	Repository string `json:"repository"`
	Name       string `json:"name"`
}

type ChartManifest

type ChartManifest struct {
	Id        string
	Name      string
	VersionId string
	Version   string
}

type Context

type Context struct {
	Bundles       []*Bundle
	Buckets       []string
	Domains       []string
	Protect       []string `yaml:"protect,omitempty" json:"protect,omitempty"`
	SMTP          *SMTP    `yaml:"smtp,omitempty"`
	Globals       *Globals `yaml:"globals,omitempty" json:"globals,omitempty"`
	Configuration map[string]map[string]interface{}
}

func FetchContext

func FetchContext() (*Context, error)

func NewContext

func NewContext() *Context

func ReadContext

func ReadContext(path string) (c *Context, err error)

func (*Context) AddBucket

func (c *Context) AddBucket(bucket string)

func (*Context) AddBundle

func (c *Context) AddBundle(repo, name string)

func (*Context) AddDomain

func (c *Context) AddDomain(domain string)

func (*Context) ContainsString

func (c *Context) ContainsString(str, msg, ignoreRepo, ignoreKey string) error

func (*Context) HasBucket

func (c *Context) HasBucket(bucket string) bool

func (*Context) HasDomain

func (c *Context) HasDomain(domain string) bool

func (*Context) MarshalJSON

func (this *Context) MarshalJSON() ([]byte, error)

func (*Context) Protected

func (c *Context) Protected(name string) bool

func (*Context) Repo

func (c *Context) Repo(name string) (res map[string]interface{}, ok bool)

func (*Context) Write

func (c *Context) Write(path string) error

type Dependency

type Dependency struct {
	Repo string
}

type Globals

type Globals struct {
	CertIssuer   string `yaml:"certIssuer"`
	IngressClass string `yaml:"ingressClass"`
}
type Links struct {
	Terraform map[string]string
	Helm      map[string]string
}

type Manifest

type Manifest struct {
	Id           string
	Name         string
	Cluster      string
	Project      string
	Bucket       string
	Provider     string
	Region       string
	License      string
	Wait         bool
	Charts       []*ChartManifest
	Terraform    []*TerraformManifest
	Dependencies []*Dependency
	Context      map[string]interface{}
	Links        *Links `yaml:"links,omitempty"`
}

func Read

func Read(path string) (man *Manifest, err error)
func (man *Manifest) AddLink(tool, name, path string)
func (man *Manifest) Unlink(tool, name string)

func (*Manifest) UnlinkAll

func (man *Manifest) UnlinkAll()

func (*Manifest) Write

func (man *Manifest) Write(path string) error

type Metadata

type Metadata struct {
	Name   string
	Labels map[string]string `yaml:",omitempty"`
}

type NetworkConfig

type NetworkConfig struct {
	Subdomain string `json:"subdomain"`
	PluralDns bool   `json:"pluralDns"`
}

type Owner

type Owner struct {
	Email    string
	Endpoint string `yaml:"endpoint,omitempty"`
}

type ProjectManifest

type ProjectManifest struct {
	Cluster           string
	Bucket            string
	Project           string
	Provider          string
	Region            string
	Owner             *Owner
	Network           *NetworkConfig
	AvailabilityZones []string
	BucketPrefix      string `yaml:"bucketPrefix"`
	Context           map[string]interface{}
}

func FetchProject

func FetchProject() (*ProjectManifest, error)

func ReadProject

func ReadProject(path string) (man *ProjectManifest, err error)

func (*ProjectManifest) Configure

func (pMan *ProjectManifest) Configure(cloud bool) Writer

func (*ProjectManifest) ConfigureNetwork

func (pMan *ProjectManifest) ConfigureNetwork() error

func (*ProjectManifest) Flush

func (man *ProjectManifest) Flush() error

func (*ProjectManifest) MarshalJSON

func (this *ProjectManifest) MarshalJSON() ([]byte, error)

func (*ProjectManifest) Write

func (pMan *ProjectManifest) Write(path string) error

type SMTP

type SMTP struct {
	Service  string
	Server   string
	Port     int
	Sender   string
	User     string
	Password string
}

func (*SMTP) Configuration

func (smtp *SMTP) Configuration() map[string]interface{}

func (*SMTP) GetPort

func (smtp *SMTP) GetPort() int

func (*SMTP) GetServer

func (smtp *SMTP) GetServer() string

type SmtpService

type SmtpService struct {
	Server string
	Port   int
}

type TerraformManifest

type TerraformManifest struct {
	Id   string
	Name string
}

type VersionedContext

type VersionedContext struct {
	ApiVersion string   `yaml:"apiVersion"`
	Kind       string   `yaml:"kind"`
	Spec       *Context `yaml:"spec"`
}

type VersionedManifest

type VersionedManifest struct {
	ApiVersion string `yaml:"apiVersion"`
	Kind       string
	Metadata   *Metadata
	Spec       *Manifest
}

type VersionedProjectManifest

type VersionedProjectManifest struct {
	ApiVersion string `yaml:"apiVersion"`
	Kind       string
	Metadata   *Metadata
	Spec       *ProjectManifest
}

type Writer

type Writer func() error

Jump to

Keyboard shortcuts

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