Documentation ¶
Overview ¶
Package soapboxd provides server-side implementation of the services defined in the proto package for Soapbox application, deployment, environment, etc. related services.
Index ¶
- Constants
- type Application
- type CloudProvider
- type ConfigurationStore
- type Deployer
- type Environment
- type ObjectStore
- type Server
- func (s *Server) AddActivity(ctx context.Context, activity *pb.Activity) (*pb.Empty, error)
- func (s *Server) AddApplicationActivity(ctx context.Context, applicationID int32, userID int32, ...) error
- func (s *Server) AddCreateEnvironmentActivity(ctx context.Context, env *pb.Environment) error
- func (s *Server) AddDeploymentActivity(ctx context.Context, activityType pb.ActivityType, dep *pb.Deployment) error
- func (s *Server) AssignGithubOmniauthTokenToUser(ctx context.Context, user *pb.User) (*pb.User, error)
- func (s *Server) CreateApplication(ctx context.Context, app *pb.Application) (*pb.Application, error)
- func (s *Server) CreateConfiguration(ctx context.Context, req *proto.CreateConfigurationRequest) (*proto.Configuration, error)
- func (s *Server) CreateEnvironment(ctx context.Context, req *pb.Environment) (*pb.Environment, error)
- func (s *Server) CreateUser(ctx context.Context, user *pb.CreateUserRequest) (*pb.User, error)
- func (s *Server) DeleteApplication(ctx context.Context, app *pb.Application) (*pb.Empty, error)
- func (s *Server) DeleteConfiguration(ctx context.Context, req *proto.DeleteConfigurationRequest) (*proto.Empty, error)
- func (s *Server) DestroyEnvironment(ctx context.Context, req *pb.DestroyEnvironmentRequest) (*pb.Empty, error)
- func (s *Server) GetApplication(ctx context.Context, req *pb.GetApplicationRequest) (*pb.Application, error)
- func (s *Server) GetApplicationMetrics(ctx context.Context, req *pb.GetApplicationMetricsRequest) (*pb.ApplicationMetricsResponse, error)
- func (s *Server) GetDeployment(ctx context.Context, req *pb.GetDeploymentRequest) (*pb.Deployment, error)
- func (s *Server) GetDeploymentStatus(ctx context.Context, req *pb.GetDeploymentStatusRequest) (*pb.GetDeploymentStatusResponse, error)
- func (s *Server) GetEnvironment(ctx context.Context, req *pb.GetEnvironmentRequest) (*pb.Environment, error)
- func (s *Server) GetLatestConfiguration(ctx context.Context, req *proto.GetLatestConfigurationRequest) (*proto.Configuration, error)
- func (s *Server) GetLatestDeployment(ctx context.Context, req *pb.GetLatestDeploymentRequest) (*pb.Deployment, error)
- func (s *Server) GetUser(ctx context.Context, req *pb.GetUserRequest) (*pb.User, error)
- func (s *Server) GetVersion(ctx context.Context, req *pb.Empty) (*pb.GetVersionResponse, error)
- func (s *Server) ListActivities(ctx context.Context, _ *pb.Empty) (*pb.ListActivitiesResponse, error)
- func (s *Server) ListApplicationActivities(ctx context.Context, app *pb.GetApplicationRequest) (*pb.ListActivitiesResponse, error)
- func (s *Server) ListApplications(ctx context.Context, req *pb.ListApplicationRequest) (*pb.ListApplicationResponse, error)
- func (s *Server) ListConfigurations(ctx context.Context, req *proto.ListConfigurationRequest) (*proto.ListConfigurationResponse, error)
- func (s *Server) ListDeploymentActivities(ctx context.Context, app *pb.GetDeploymentRequest) (*pb.ListActivitiesResponse, error)
- func (s *Server) ListDeployments(ctx context.Context, req *pb.ListDeploymentRequest) (*pb.ListDeploymentResponse, error)
- func (s *Server) ListEnvironments(ctx context.Context, req *pb.ListEnvironmentRequest) (*pb.ListEnvironmentResponse, error)
- func (s *Server) LoginUser(ctx context.Context, req *pb.LoginUserRequest) (*pb.LoginUserResponse, error)
- func (s *Server) StartDeployment(ctx context.Context, req *pb.Deployment) (*pb.StartDeploymentResponse, error)
- func (s *Server) TeardownDeployment(ctx context.Context, req *pb.TeardownDeploymentRequest) (*pb.Empty, error)
Constants ¶
const SoapboxImageBucket = "soapbox-app-images"
SoapboxImageBucket is the location within the blob store to hold build images
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
Application is a minimal version of the information about an app on the platform
type CloudProvider ¶
type CloudProvider interface { ObjectStore ConfigurationStore Deployer }
CloudProvider is a summation type of all the interfaces that a cloud must provide
type ConfigurationStore ¶
type ConfigurationStore interface { GetConfigVars(appSlug string, envSlug string, version int32) ([]*pb.ConfigVar, error) SaveConfigVars(appSlug string, envSlug string, version int32, configVars []*pb.ConfigVar, kmsKeyARN string) error DeleteConfigVars(appSlug string, envSlug string, version int32) error }
ConfigurationStore represents a place that can store and retrieve configurations for applications
type Deployer ¶
type Deployer interface { Deploy(app Application, env Environment, config *pb.Configuration) error // Deploy is defined by the trio of application, environment, and configuration Rollforward(app Application, env Environment) error // Finalize a successful deployment Cleanup(app Application, env Environment) // Clean any remaining resources (e.g., Blue group) from either a failed or successful deployment }
Deployer represents something that can blue/green deploy an image to a cloud provider
type Environment ¶
Environment is a minimal version of the information about an environment into which an application can be deployed
type ObjectStore ¶
ObjectStore represents a blob store that can hold arbitrary files
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the basic soapbox server containing all the initialized items needed to perform its functions
func (*Server) AddActivity ¶
func (*Server) AddApplicationActivity ¶
func (*Server) AddCreateEnvironmentActivity ¶
func (*Server) AddDeploymentActivity ¶
func (s *Server) AddDeploymentActivity(ctx context.Context, activityType pb.ActivityType, dep *pb.Deployment) error
func (*Server) AssignGithubOmniauthTokenToUser ¶
func (*Server) CreateApplication ¶
func (s *Server) CreateApplication(ctx context.Context, app *pb.Application) (*pb.Application, error)
func (*Server) CreateConfiguration ¶
func (s *Server) CreateConfiguration(ctx context.Context, req *proto.CreateConfigurationRequest) (*proto.Configuration, error)
func (*Server) CreateEnvironment ¶
func (s *Server) CreateEnvironment(ctx context.Context, req *pb.Environment) (*pb.Environment, error)
func (*Server) CreateUser ¶
func (*Server) DeleteApplication ¶
func (*Server) DeleteConfiguration ¶
func (*Server) DestroyEnvironment ¶
func (*Server) GetApplication ¶
func (s *Server) GetApplication(ctx context.Context, req *pb.GetApplicationRequest) (*pb.Application, error)
func (*Server) GetApplicationMetrics ¶
func (s *Server) GetApplicationMetrics(ctx context.Context, req *pb.GetApplicationMetricsRequest) (*pb.ApplicationMetricsResponse, error)
func (*Server) GetDeployment ¶
func (s *Server) GetDeployment(ctx context.Context, req *pb.GetDeploymentRequest) (*pb.Deployment, error)
func (*Server) GetDeploymentStatus ¶
func (s *Server) GetDeploymentStatus(ctx context.Context, req *pb.GetDeploymentStatusRequest) (*pb.GetDeploymentStatusResponse, error)
func (*Server) GetEnvironment ¶
func (s *Server) GetEnvironment(ctx context.Context, req *pb.GetEnvironmentRequest) (*pb.Environment, error)
func (*Server) GetLatestConfiguration ¶
func (s *Server) GetLatestConfiguration(ctx context.Context, req *proto.GetLatestConfigurationRequest) (*proto.Configuration, error)
func (*Server) GetLatestDeployment ¶
func (s *Server) GetLatestDeployment(ctx context.Context, req *pb.GetLatestDeploymentRequest) (*pb.Deployment, error)
GetLatestDeployment gets latest deployment for an application environment.
func (*Server) GetVersion ¶
func (*Server) ListActivities ¶
func (*Server) ListApplicationActivities ¶
func (s *Server) ListApplicationActivities(ctx context.Context, app *pb.GetApplicationRequest) (*pb.ListActivitiesResponse, error)
func (*Server) ListApplications ¶
func (s *Server) ListApplications(ctx context.Context, req *pb.ListApplicationRequest) (*pb.ListApplicationResponse, error)
func (*Server) ListConfigurations ¶
func (s *Server) ListConfigurations(ctx context.Context, req *proto.ListConfigurationRequest) (*proto.ListConfigurationResponse, error)
func (*Server) ListDeploymentActivities ¶
func (s *Server) ListDeploymentActivities(ctx context.Context, app *pb.GetDeploymentRequest) (*pb.ListActivitiesResponse, error)
func (*Server) ListDeployments ¶
func (s *Server) ListDeployments(ctx context.Context, req *pb.ListDeploymentRequest) (*pb.ListDeploymentResponse, error)
func (*Server) ListEnvironments ¶
func (s *Server) ListEnvironments(ctx context.Context, req *pb.ListEnvironmentRequest) (*pb.ListEnvironmentResponse, error)
func (*Server) LoginUser ¶
func (s *Server) LoginUser(ctx context.Context, req *pb.LoginUserRequest) (*pb.LoginUserResponse, error)
func (*Server) StartDeployment ¶
func (s *Server) StartDeployment(ctx context.Context, req *pb.Deployment) (*pb.StartDeploymentResponse, error)