Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CreateTypeOrgRepo represents a query to create an // index on the secrets table for the type, org and repo columns. CreateTypeOrgRepo = ` CREATE INDEX IF NOT EXISTS secrets_type_org_repo ON secrets (type, org, repo); ` // CreateTypeOrgTeam represents a query to create an // index on the secrets table for the type, org and team columns. CreateTypeOrgTeam = ` CREATE INDEX IF NOT EXISTS secrets_type_org_team ON secrets (type, org, team); ` // CreateTypeOrg represents a query to create an // index on the secrets table for the type, and org columns. CreateTypeOrg = ` CREATE INDEX IF NOT EXISTS secrets_type_org ON secrets (type, org); ` )
View Source
const ( // CreatePostgresTable represents a query to create the Postgres secrets table. CreatePostgresTable = `` /* 589-byte string literal not displayed */ // CreateSqliteTable represents a query to create the Sqlite secrets table. CreateSqliteTable = `` /* 537-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EngineOpt ¶
type EngineOpt func(*engine) error
EngineOpt represents a configuration option to initialize the database engine for Secrets.
func WithClient ¶
WithClient sets the gorm.io/gorm client in the database engine for Secrets.
func WithContext ¶ added in v0.21.0
WithContext sets the context in the database engine for Secrets.
func WithEncryptionKey ¶
WithEncryptionKey sets the encryption key in the database engine for Secrets.
func WithLogger ¶
WithLogger sets the github.com/sirupsen/logrus logger in the database engine for Secrets.
func WithSkipCreation ¶
WithSkipCreation sets the skip creation logic in the database engine for Secrets.
type SecretInterface ¶ added in v0.20.0
type SecretInterface interface { // CreateSecretIndexes defines a function that creates the indexes for the secrets table. CreateSecretIndexes(context.Context) error // CreateSecretTable defines a function that creates the secrets table. CreateSecretTable(context.Context, string) error // CountSecrets defines a function that gets the count of all secrets. CountSecrets(context.Context) (int64, error) // CountSecretsForOrg defines a function that gets the count of secrets by org name. CountSecretsForOrg(context.Context, string, map[string]interface{}) (int64, error) // CountSecretsForRepo defines a function that gets the count of secrets by org and repo name. CountSecretsForRepo(context.Context, *api.Repo, map[string]interface{}) (int64, error) // CountSecretsForTeam defines a function that gets the count of secrets by org and team name. CountSecretsForTeam(context.Context, string, string, map[string]interface{}) (int64, error) // CountSecretsForTeams defines a function that gets the count of secrets by teams within an org. CountSecretsForTeams(context.Context, string, []string, map[string]interface{}) (int64, error) // CreateSecret defines a function that creates a new secret. CreateSecret(context.Context, *library.Secret) (*library.Secret, error) // DeleteSecret defines a function that deletes an existing secret. DeleteSecret(context.Context, *library.Secret) error // GetSecret defines a function that gets a secret by ID. GetSecret(context.Context, int64) (*library.Secret, error) // GetSecretForOrg defines a function that gets a secret by org name. GetSecretForOrg(context.Context, string, string) (*library.Secret, error) // GetSecretForRepo defines a function that gets a secret by org and repo name. GetSecretForRepo(context.Context, string, *api.Repo) (*library.Secret, error) // GetSecretForTeam defines a function that gets a secret by org and team name. GetSecretForTeam(context.Context, string, string, string) (*library.Secret, error) // ListSecrets defines a function that gets a list of all secrets. ListSecrets(context.Context) ([]*library.Secret, error) // ListSecretsForOrg defines a function that gets a list of secrets by org name. ListSecretsForOrg(context.Context, string, map[string]interface{}, int, int) ([]*library.Secret, int64, error) // ListSecretsForRepo defines a function that gets a list of secrets by org and repo name. ListSecretsForRepo(context.Context, *api.Repo, map[string]interface{}, int, int) ([]*library.Secret, int64, error) // ListSecretsForTeam defines a function that gets a list of secrets by org and team name. ListSecretsForTeam(context.Context, string, string, map[string]interface{}, int, int) ([]*library.Secret, int64, error) // ListSecretsForTeams defines a function that gets a list of secrets by teams within an org. ListSecretsForTeams(context.Context, string, []string, map[string]interface{}, int, int) ([]*library.Secret, int64, error) // UpdateSecret defines a function that updates an existing secret. UpdateSecret(context.Context, *library.Secret) (*library.Secret, error) }
SecretInterface represents the Vela interface for secret functions with the supported Database backends.
Click to show internal directories.
Click to hide internal directories.