service

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackgroundWorkerResourceType = "Background Worker"
	CronJobResourceType          = "Cron Job"
	PrivateServiceResourceType   = "Private Service"
	StaticSiteResourceType       = "Static Site"
	WebServiceResourceType       = "Web Service"
)

Variables

Functions

This section is empty.

Types

type Model

type Model struct {
	Service     *client.Service     `json:"service"`
	Project     *client.Project     `json:"project,omitempty"`
	Environment *client.Environment `json:"environment,omitempty"`
}

func (Model) EnvironmentName

func (s Model) EnvironmentName() string

func (Model) ID

func (s Model) ID() string

func (Model) Name

func (s Model) Name() string

func (Model) ProjectName

func (s Model) ProjectName() string

func (Model) Type

func (s Model) Type() string

type Repo

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

func NewRepo

func NewRepo(c *client.ClientWithResponses) *Repo

func (*Repo) CreateService

func (s *Repo) CreateService(ctx context.Context, data client.CreateServiceJSONRequestBody) (*client.Service, error)

func (*Repo) DeployService

func (s *Repo) DeployService(ctx context.Context, svc *client.Service) (*client.Deploy, error)

func (*Repo) GetService

func (s *Repo) GetService(ctx context.Context, id string) (*client.Service, error)

func (*Repo) ListServices

func (s *Repo) ListServices(ctx context.Context, params *client.ListServicesParams) ([]*client.Service, error)

func (*Repo) RestartService

func (s *Repo) RestartService(ctx context.Context, id string) error

func (*Repo) UpdateService

func (s *Repo) UpdateService(ctx context.Context, id string, data client.UpdateServiceJSONRequestBody) (*client.Service, error)

type Service

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

func NewService

func NewService(repo *Repo, environmentRepo *environment.Repo, projectRepo *project.Repo) *Service

func (*Service) GetService

func (s *Service) GetService(ctx context.Context, id string) (*Model, error)

func (*Service) ListServices

func (s *Service) ListServices(ctx context.Context, params *client.ListServicesParams) ([]*Model, error)

func (*Service) RestartService

func (s *Service) RestartService(ctx context.Context, id string) error

Jump to

Keyboard shortcuts

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