Documentation ¶
Overview ¶
Package database is a database interface to authorized apps.
Index ¶
- type AuthorizedAppDB
- func (aa *AuthorizedAppDB) DeleteAuthorizedApp(ctx context.Context, name string) error
- func (aa *AuthorizedAppDB) GetAuthorizedApp(ctx context.Context, sm secrets.SecretManager, name string) (*model.AuthorizedApp, error)
- func (aa *AuthorizedAppDB) InsertAuthorizedApp(ctx context.Context, m *model.AuthorizedApp) error
- func (aa *AuthorizedAppDB) ListAuthorizedApps(ctx context.Context) ([]*model.AuthorizedApp, error)
- func (aa *AuthorizedAppDB) UpdateAuthorizedApp(ctx context.Context, priorKey string, m *model.AuthorizedApp) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizedAppDB ¶
type AuthorizedAppDB struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *database.DB) *AuthorizedAppDB
func (*AuthorizedAppDB) DeleteAuthorizedApp ¶
func (aa *AuthorizedAppDB) DeleteAuthorizedApp(ctx context.Context, name string) error
func (*AuthorizedAppDB) GetAuthorizedApp ¶
func (aa *AuthorizedAppDB) GetAuthorizedApp(ctx context.Context, sm secrets.SecretManager, name string) (*model.AuthorizedApp, error)
GetAuthorizedApp loads a single AuthorizedApp for the given name. If no row exists, this returns nil.
func (*AuthorizedAppDB) InsertAuthorizedApp ¶
func (aa *AuthorizedAppDB) InsertAuthorizedApp(ctx context.Context, m *model.AuthorizedApp) error
func (*AuthorizedAppDB) ListAuthorizedApps ¶
func (aa *AuthorizedAppDB) ListAuthorizedApps(ctx context.Context) ([]*model.AuthorizedApp, error)
func (*AuthorizedAppDB) UpdateAuthorizedApp ¶
func (aa *AuthorizedAppDB) UpdateAuthorizedApp(ctx context.Context, priorKey string, m *model.AuthorizedApp) error
Click to show internal directories.
Click to hide internal directories.