resource

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BreadcrumbForResource(r Resource) string

Types

type Resource

type Resource interface {
	ID() string
	Name() string
	EnvironmentName() string
	ProjectName() string
	Type() string
}

func GetResource

func GetResource(ctx context.Context, id string) (Resource, error)

type ResourceParams

type ResourceParams struct {
	EnvironmentIDs  []string
	IncludePreviews bool
}

func (ResourceParams) ToPostgresParams

func (r ResourceParams) ToPostgresParams() *client.ListPostgresParams

func (ResourceParams) ToRedisParams

func (r ResourceParams) ToRedisParams() *client.ListRedisParams

func (ResourceParams) ToServiceParams

func (r ResourceParams) ToServiceParams() *client.ListServicesParams

type Service

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

func NewDefaultResourceService

func NewDefaultResourceService() (*Service, error)

func NewResourceService

func NewResourceService(serviceService *service.Service, postgresService *postgres.Service, redisService *redis.Service, environmentRepo *environment.Repo, projectRepo *project.Repo) *Service

func (*Service) GetResource

func (rs *Service) GetResource(ctx context.Context, id string) (Resource, error)

func (*Service) ListResources

func (rs *Service) ListResources(ctx context.Context, params ResourceParams) ([]Resource, error)

func (*Service) RestartResource

func (rs *Service) RestartResource(ctx context.Context, id string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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