Documentation ¶
Overview ¶
Package storage contains types and functions for managing data storage in identity-api.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrorInvalidContextTx = fmt.Errorf("invalid type for transaction context")
ErrorInvalidContextTx represents an error where the given context transaction is of the wrong type.
var ErrorMissingContextTx = fmt.Errorf("no transaction provided in context")
ErrorMissingContextTx represents an error where no context transaction was provided.
Functions ¶
func InMemoryCRDB ¶ added in v0.0.8
func InMemoryCRDB() (testserver.TestServer, error)
InMemoryCRDB creates an in-memory CRDB test server.
func RunMigrations ¶ added in v0.0.6
RunMigrations runs all migrations using the given storage config.
Types ¶
type Engine ¶
type Engine interface { types.IssuerService types.UserInfoService types.OAuthClientManager TransactionManager }
Engine represents a storage engine.
type EngineOption ¶ added in v0.0.8
type EngineOption func(*engine) error
EngineOption defines an initialization option for a storage engine.
func WithMigrations ¶ added in v0.0.8
func WithMigrations() EngineOption
WithMigrations runs migrations on the storage engine.
func WithSeedData ¶ added in v0.0.8
func WithSeedData(data SeedData) EngineOption
WithSeedData adds seed data to the storage engine.
type SeedData ¶
type SeedData struct {
Issuers []SeedIssuer
}
SeedData represents the seed data for an identity-api instance on startup.
type SeedIssuer ¶
type SeedIssuer struct { OwnerID gidx.PrefixedID `yaml:"ownerID"` ID gidx.PrefixedID `yaml:"id"` Name string `yaml:"name"` URI string `yaml:"uri"` JWKSURI string `yaml:"jwksURI"` ClaimMappings map[string]string `yaml:"claimMappings"` }
SeedIssuer represents the seed data for a single issuer.