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 = `` /* 496-byte string literal not displayed */ // CreateSqliteTable represents a query to create the Sqlite secrets table. CreateSqliteTable = `` /* 435-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 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() error // CreateSecretTable defines a function that creates the secrets table. CreateSecretTable(string) error // CountSecrets defines a function that gets the count of all secrets. CountSecrets() (int64, error) // CountSecretsForOrg defines a function that gets the count of secrets by org name. CountSecretsForOrg(string, map[string]interface{}) (int64, error) // CountSecretsForRepo defines a function that gets the count of secrets by org and repo name. CountSecretsForRepo(*library.Repo, map[string]interface{}) (int64, error) // CountSecretsForTeam defines a function that gets the count of secrets by org and team name. CountSecretsForTeam(string, string, map[string]interface{}) (int64, error) // CountSecretsForTeams defines a function that gets the count of secrets by teams within an org. CountSecretsForTeams(string, []string, map[string]interface{}) (int64, error) // CreateSecret defines a function that creates a new secret. CreateSecret(*library.Secret) error // DeleteSecret defines a function that deletes an existing secret. DeleteSecret(*library.Secret) error // GetSecret defines a function that gets a secret by ID. GetSecret(int64) (*library.Secret, error) // GetSecretForOrg defines a function that gets a secret by org name. GetSecretForOrg(string, string) (*library.Secret, error) // GetSecretForRepo defines a function that gets a secret by org and repo name. GetSecretForRepo(string, *library.Repo) (*library.Secret, error) // GetSecretForTeam defines a function that gets a secret by org and team name. GetSecretForTeam(string, string, string) (*library.Secret, error) // ListSecrets defines a function that gets a list of all secrets. ListSecrets() ([]*library.Secret, error) // ListSecretsForOrg defines a function that gets a list of secrets by org name. ListSecretsForOrg(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(*library.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(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(string, []string, map[string]interface{}, int, int) ([]*library.Secret, int64, error) // UpdateSecret defines a function that updates an existing secret. UpdateSecret(*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.