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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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