{"modulePath":"github.com/chainloop-dev/chainloop","version":"v0.91.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package credentials\n\n## Variables\n\n```go\nvar ErrNotFound = errors.New(\"credentials not found\")\n```\n\n```go\nvar ErrValidation = errors.New(\"credentials validation error\")\n```\n\n## Types\n\n```go\ntype APICreds struct {\n\tHost, Key string\n}\n```\n\n```go\nfunc (a *APICreds) Validate() error\n```\nValidate that the APICreds has all its properties set\n\n```go\ntype OCIKeypair struct {\n\tRepo, Username, Password string\n}\n```\n\n```go\nfunc (o *OCIKeypair) Validate() error\n```\nValidate that the OCIKeypair has all its properties set\n\n```go\ntype Reader interface {\n\tReadCredentials(ctx context.Context, secretName string, credentials any) error\n}\n```\n\n```go\ntype ReaderWriter interface {\n\tReader\n\tWriter\n}\n```\n\n```go\ntype Role int64\n```\n\n```go\nconst (\n\tRoleUnknown Role = iota\n\tRoleReader\n\tRoleWriter\n)\n```\n\n```go\nfunc (r Role) String() string\n```\nImplement string interface for Role\n\n```go\ntype Writer interface {\n\tSaveCredentials(ctx context.Context, org string, credentials any) (string, error)\n\tDeleteCredentials(ctx context.Context, credID string) error\n}\n```\n\n","path":"github.com/chainloop-dev/chainloop/internal/credentials","name":"credentials","synopsis":"","isRedistributable":true}
