Documentation ¶
Index ¶
- Constants
- Variables
- func RunCustomDeployment(core *Core, component *model.Component) error
- type Action
- type Apps
- type CapacityService
- type CloudAccounts
- type Collection
- func (c *Collection) Create(m model.Model) error
- func (c *Collection) Delete(id *int64, m model.Model) error
- func (c *Collection) Get(id *int64, m model.Model) error
- func (c *Collection) GetWithIncludes(id *int64, m model.Model, includes []string) error
- func (c *Collection) Update(id *int64, oldM model.Model, m model.Model) error
- type Components
- type Core
- func (c *Core) APIURL() string
- func (c *Core) BaseURL() string
- func (c *Core) HTTPSURL() string
- func (c *Core) HTTPURL() string
- func (c *Core) Initialize()
- func (c *Core) InitializeBackground()
- func (c *Core) InitializeForeground() error
- func (c *Core) K8S(m *model.Kube) guber.Client
- func (c *Core) NewAPIClient(authType string, authToken string) *client.Client
- func (c *Core) SSLEnabled() bool
- func (c *Core) SetResourceActionStatus(m model.Model)
- func (c *Core) UIURL() string
- type DB
- func (db *DB) Create(m model.Model) error
- func (db *DB) Delete(m model.Model) error
- func (db *DB) Find(out interface{}, where ...interface{}) error
- func (db *DB) First(out interface{}, where ...interface{}) error
- func (db *DB) Limit(limit interface{}) *DB
- func (db *DB) Offset(offset interface{}) *DB
- func (db *DB) Preload(column string, conditions ...interface{}) *DB
- func (db *DB) Save(m model.Model) error
- func (db *DB) Where(query interface{}, args ...interface{}) *DB
- type Entrypoints
- func (c *Entrypoints) Create(m *model.Entrypoint) error
- func (c *Entrypoints) Delete(id *int64, m *model.Entrypoint) *Action
- func (c *Entrypoints) RemovePort(id *int64, m *model.Entrypoint, elbPort int64) error
- func (c *Entrypoints) SetPort(id *int64, m *model.Entrypoint, elbPort int64, instancePort int64) error
- type InstanceObserver
- type Instances
- func (c *Instances) CreateVolumes(id *int64, m *model.Instance) error
- func (c *Instances) Delete(id *int64, m *model.Instance) *Action
- func (c *Instances) Log(m *model.Instance) (string, error)
- func (c *Instances) Start(id *int64, m *model.Instance) *Action
- func (c *Instances) Stop(id *int64, m *model.Instance) *Action
- type KubeScaler
- type Kubes
- type NodeObserver
- type NodeSize
- type Nodes
- type PodNotFoundError
- type Port
- type PrivateImageKeys
- type Procedure
- type Provider
- type RecurringService
- type Releases
- type RepeatedActionError
- type SafeMap
- type Service
- type ServiceSet
- type SessionExpirer
- type Sessions
- type Settings
- type Step
- type Users
- type Volumes
Constants ¶
View Source
const (
SessionCookieName = "supergiant_session"
)
Variables ¶
View Source
var (
ErrorBadLogin = errors.New("Invalid credentials")
)
Functions ¶
Types ¶
type Action ¶
type Action struct { Status *model.ActionStatus // contains filtered or unexported fields }
func (*Action) CancellableWaitFor ¶ added in v0.9.0
type Apps ¶
type Apps struct {
Collection
}
type CapacityService ¶
type CapacityService struct {
// contains filtered or unexported fields
}
func (*CapacityService) Perform ¶
func (s *CapacityService) Perform() error
type CloudAccounts ¶
type CloudAccounts struct {
Collection
}
func (*CloudAccounts) Create ¶
func (c *CloudAccounts) Create(m *model.CloudAccount) error
func (*CloudAccounts) Delete ¶
func (c *CloudAccounts) Delete(id *int64, m *model.CloudAccount) error
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
func (*Collection) GetWithIncludes ¶
type Components ¶
type Components struct {
Collection
}
type Core ¶
type Core struct { Settings // NOTE we do this to prevent having to load all the cloud provider various // lib code everytime we load core AWSProvider func(map[string]string) Provider DOProvider func(map[string]string) Provider Log *logrus.Logger DB *DB Sessions *Sessions Users *Users CloudAccounts *CloudAccounts Kubes *Kubes Apps *Apps Components *Components Releases *Releases Instances *Instances Volumes *Volumes PrivateImageKeys *PrivateImageKeys Entrypoints *Entrypoints Nodes *Nodes // TODO should this be a pseudo-collection like Sessions? Actions *SafeMap }
func (*Core) Initialize ¶
func (c *Core) Initialize()
NOTE this used to be core.New(), but due to how we load in values from the cli package, I needed to first actually initialize a Core struct and then configure.
func (*Core) InitializeBackground ¶ added in v0.9.0
func (c *Core) InitializeBackground()
InitializeBackground starts Action processing and RecurringServices for *Core.
func (*Core) InitializeForeground ¶ added in v0.9.0
InitializeForeground sets up Log and DB on *Core.
func (*Core) NewAPIClient ¶
func (*Core) SSLEnabled ¶ added in v0.8.6
func (*Core) SetResourceActionStatus ¶
type Entrypoints ¶
type Entrypoints struct {
Collection
}
func (*Entrypoints) Create ¶
func (c *Entrypoints) Create(m *model.Entrypoint) error
func (*Entrypoints) Delete ¶
func (c *Entrypoints) Delete(id *int64, m *model.Entrypoint) *Action
func (*Entrypoints) RemovePort ¶
func (c *Entrypoints) RemovePort(id *int64, m *model.Entrypoint, elbPort int64) error
func (*Entrypoints) SetPort ¶
func (c *Entrypoints) SetPort(id *int64, m *model.Entrypoint, elbPort int64, instancePort int64) error
type InstanceObserver ¶
type InstanceObserver struct {
// contains filtered or unexported fields
}
func (*InstanceObserver) Perform ¶
func (s *InstanceObserver) Perform() error
type KubeScaler ¶
type KubeScaler struct {
// contains filtered or unexported fields
}
func (*KubeScaler) Scale ¶
func (s *KubeScaler) Scale() error
type Kubes ¶
type Kubes struct {
Collection
}
type NodeObserver ¶
type NodeObserver struct {
// contains filtered or unexported fields
}
func (*NodeObserver) Perform ¶
func (s *NodeObserver) Perform() error
type Nodes ¶
type Nodes struct {
Collection
}
type PodNotFoundError ¶
type PodNotFoundError struct {
InstanceID *int64
}
func (*PodNotFoundError) Error ¶
func (err *PodNotFoundError) Error() string
type PrivateImageKeys ¶
type PrivateImageKeys struct {
Collection
}
func (*PrivateImageKeys) Create ¶
func (c *PrivateImageKeys) Create(m *model.PrivateImageKey) error
type Procedure ¶ added in v0.10.0
type Procedure struct { Core *Core Name string Model model.Model // contains filtered or unexported fields }
type Provider ¶ added in v0.8.5
type Provider interface { ValidateAccount(*model.CloudAccount) error CreateKube(*model.Kube, *Action) error DeleteKube(*model.Kube) error CreateNode(*model.Node, *Action) error DeleteNode(*model.Node) error CreateVolume(*model.Volume, *Action) error KubernetesVolumeDefinition(*model.Volume) *guber.Volume WaitForVolumeAvailable(*model.Volume, *Action) error ResizeVolume(*model.Volume, *Action) error DeleteVolume(*model.Volume) error CreateEntrypoint(*model.Entrypoint, *Action) error AddPortToEntrypoint(*model.Entrypoint, int64, int64) error RemovePortFromEntrypoint(*model.Entrypoint, int64) error DeleteEntrypoint(*model.Entrypoint) error }
type RecurringService ¶
type RecurringService struct {
// contains filtered or unexported fields
}
func (*RecurringService) Run ¶
func (s *RecurringService) Run()
type Releases ¶
type Releases struct {
Collection
}
type RepeatedActionError ¶
type RepeatedActionError struct {
ResourceID string
}
func (*RepeatedActionError) Error ¶
func (err *RepeatedActionError) Error() string
type SafeMap ¶ added in v0.9.0
type SafeMap struct {
// contains filtered or unexported fields
}
SafeMap is a concurrently-accessible map
func NewSafeMap ¶ added in v0.9.0
type ServiceSet ¶
type ServiceSet struct {
// contains filtered or unexported fields
}
type SessionExpirer ¶ added in v0.9.0
type SessionExpirer struct {
// contains filtered or unexported fields
}
func (*SessionExpirer) Perform ¶ added in v0.9.0
func (s *SessionExpirer) Perform() error
type Sessions ¶ added in v0.9.0
type Sessions struct {
// contains filtered or unexported fields
}
func NewSessions ¶ added in v0.9.0
type Settings ¶ added in v0.8.2
type Settings struct { ConfigFilePath string PsqlHost string `json:"psql_host"` PsqlDb string `json:"psql_db"` PsqlUser string `json:"psql_user"` PsqlPass string `json:"psql_pass"` SQLiteFile string `json:"sqlite_file"` PublishHost string `json:"publish_host"` HTTPPort string `json:"http_port"` HTTPSPort string `json:"https_port"` SSLCertFile string `json:"ssl_cert_file"` SSLKeyFile string `json:"ssl_key_file"` LogPath string `json:"log_file"` LogLevel string `json:"log_level"` UIEnabled bool `json:"ui_enabled"` CapacityServiceEnabled bool `json:"capacity_service_enabled"` // NOTE these MUST be provided in ascending order by cost in order to // correctly provision the smallest size on Kube creation // // NodeSizes is a map of provider name (ex. "aws") and node sizes NodeSizes map[string][]*NodeSize `json:"node_sizes"` }
type Users ¶ added in v0.9.0
type Users struct {
Collection
}
Source Files ¶
- action.go
- apps.go
- capacity_service.go
- cloud_accounts.go
- collection.go
- components.go
- core.go
- custom_deployment.go
- db.go
- entrypoints.go
- instance_observer.go
- instances.go
- kubernetes_helpers.go
- kubes.go
- node_observer.go
- nodes.go
- port.go
- private_image_keys.go
- procedure.go
- provider.go
- recurring_service.go
- releases.go
- safe_map.go
- service_set.go
- sessions.go
- users.go
- volumes.go
Click to show internal directories.
Click to hide internal directories.