Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type CredentialResolver ¶
type CredentialResolver interface {
ResolveCredential(ctx context.Context, namespace, name string) (Credential, error)
}
type FunctionRepository ¶
type PackageDraft ¶
type PackageDraft interface { UpdateResources(ctx context.Context, new *v1alpha1.PackageRevisionResources, task *v1alpha1.Task) error // Updates desired lifecycle of the package. The lifecycle is applied on Close. UpdateLifecycle(ctx context.Context, new v1alpha1.PackageRevisionLifecycle) error // Finish round of updates. Close(ctx context.Context) (PackageRevision, error) }
type PackageResources ¶
TODO: "sigs.k8s.io/kustomize/kyaml/filesys" FileSystem?
type PackageRevision ¶
type PackageRevision interface { Name() string GetPackageRevision() (*v1alpha1.PackageRevision, error) // TODO: return PackageResources or filesystem abstraction? GetResources(ctx context.Context) (*v1alpha1.PackageRevisionResources, error) GetUpstreamLock() (kptfile.Upstream, kptfile.UpstreamLock, error) }
PackageRevision is an abstract package version. We have a single object for both Revision and Resources, because conceptually they are one object. The best way we've found (so far) to represent them in k8s is as two resources, but they map to the same object. Interesting reading: https://github.com/zecke/Kubernetes/blob/master/docs/devel/api-conventions.md#differing-representations
type Repository ¶
type Repository interface { ListPackageRevisions(ctx context.Context) ([]PackageRevision, error) // CreatePackageRevision creates a new package revision CreatePackageRevision(ctx context.Context, obj *v1alpha1.PackageRevision) (PackageDraft, error) // DeletePackageRevision deletes a package revision DeletePackageRevision(ctx context.Context, old PackageRevision) error // UpdatePackage updates a package UpdatePackage(ctx context.Context, old PackageRevision) (PackageDraft, error) }
Repository is the interface for interacting with packages in repositories TODO: we may need interface to manage repositories too. Stay tuned.
type ResourceItem ¶
type Resources ¶
type Resources struct {
Items []*ResourceItem
}
type UserInfoProvider ¶
type UserInfoProvider interface { // GetUserInfo returns the information about the user on whose behalf the request is being // processed, if any. If user cannot be determnined, returns nil. GetUserInfo(ctx context.Context) *UserInfo }
UserInfoProvider providers name of the authenticated user on whose behalf the request is being processed.