Documentation ¶
Index ¶
- func Replay(events []ddd.Event) ddd.Aggregate
- type Agent
- type Created
- type DefaultAgent
- type Destroyed
- type ReadRepository
- type Repo
- func (r *Repo) Destroy(timestamp int64) error
- func (r *Repo) Destroyed() bool
- func (r *Repo) Endpoint() string
- func (r *Repo) Events() []ddd.Event
- func (r *Repo) HelmOCI() bool
- func (r *Repo) Name() string
- func (r *Repo) Password() string
- func (r *Repo) Token() string
- func (r *Repo) Type() Type
- func (r *Repo) UUID() string
- func (r *Repo) Update(name, endpoint, token, username, password string, t Type, helmOCI bool, ...) error
- func (r *Repo) Username() string
- func (r *Repo) Version() int
- type Service
- func (s Service) All(ctx context.Context, req *pb.ReadRepos) (*pb.ReposRead, error)
- func (s Service) Create(ctx context.Context, cmd *pb.CreateRepo) (*pb.RepoCreated, error)
- func (s Service) Destroy(ctx context.Context, cmd *pb.DestroyRepo) (*pb.RepoDestroyed, error)
- func (s Service) File(ctx context.Context, req *pb.ReadFile) (*pb.FileRead, error)
- func (s Service) Read(ctx context.Context, req *pb.ReadRepo) (*pb.RepoRead, error)
- func (s Service) Ready() error
- func (s Service) Update(ctx context.Context, cmd *pb.UpdateRepo) (*pb.RepoUpdated, error)
- type Type
- type Updated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶ added in v0.6.0
type Agent interface { CheckIndex(name, endpoint, token string) bool GetChart(name, version, endpoint, token string) ([]byte, error) GetChartFromOCIV2(name, version, endpoint, username, password string) ([]byte, error) }
Agent is the interface we use to talk to helm packages
type Created ¶
type Created struct { Timestamp int64 UUID string Name string Endpoint string Token string Username string Password string Type Type HelmOCI bool }
Created is the event for when a new repo is created
type DefaultAgent ¶ added in v0.6.0
type DefaultAgent struct{}
DefaultAgent is the default implementation of the Agent interface
func (DefaultAgent) CheckIndex ¶ added in v0.6.0
func (a DefaultAgent) CheckIndex(name, endpoint, token string) bool
CheckIndex checks the index.yaml file at the repo's endpoint
func (DefaultAgent) GetChart ¶ added in v0.6.0
func (a DefaultAgent) GetChart(name, version, endpoint, token string) ([]byte, error)
GetChart downloads a single chart from a particular chart repo
func (DefaultAgent) GetChartFromOCIV2 ¶ added in v0.8.2
func (a DefaultAgent) GetChartFromOCIV2(name, version, endpoint, username, password string) ([]byte, error)
GetChartFromOCIV2 gets a chart from a V2 compliant OCI registry
type Destroyed ¶
type Destroyed struct {
Timestamp int64
}
Destroyed is the event for when a repo is destroyed
type ReadRepository ¶ added in v0.4.0
type ReadRepository struct {
// contains filtered or unexported fields
}
ReadRepository is the repository for dealing with repo reads
func NewReadRepository ¶ added in v0.4.0
func NewReadRepository(s storage.Storage) *ReadRepository
NewReadRepository creates a repository with the given storage
func (*ReadRepository) All ¶ added in v0.4.0
func (rr *ReadRepository) All() ([]*Repo, error)
All gets all repos
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo represents a repository, for now helm only
func Create ¶
func Create(uuid, name, endpoint, token, username, password string, t Type, helmOCI bool, timestamp int64) (*Repo, error)
Create handles create commands
func (*Repo) Update ¶
func (r *Repo) Update(name, endpoint, token, username, password string, t Type, helmOCI bool, timestamp int64) error
Update handles update commands
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the implementation for twirp to use
func NewService ¶
NewService creates the service
func (Service) Create ¶
func (s Service) Create(ctx context.Context, cmd *pb.CreateRepo) (*pb.RepoCreated, error)
Create adds a repo to the list of configurations
func (Service) Destroy ¶
func (s Service) Destroy(ctx context.Context, cmd *pb.DestroyRepo) (*pb.RepoDestroyed, error)
Destroy removes a repo from the list of configurations
func (Service) Ready ¶ added in v0.3.2
Ready implements the ReadyService method so this service can be part of a health check routine
func (Service) Update ¶
func (s Service) Update(ctx context.Context, cmd *pb.UpdateRepo) (*pb.RepoUpdated, error)
Update edits an already existing repo