Documentation ¶
Index ¶
- type DB
- func (db *DB) Authorize(ctx context.Context, id string, t Type) (context.Context, error)
- func (db *DB) Create(ctx context.Context, i *IntegrationKey) (*IntegrationKey, error)
- func (db *DB) CreateKeyTx(ctx context.Context, tx *sql.Tx, i *IntegrationKey) (*IntegrationKey, error)
- func (db *DB) Delete(ctx context.Context, id string) error
- func (db *DB) DeleteManyTx(ctx context.Context, tx *sql.Tx, ids []string) error
- func (db *DB) DeleteTx(ctx context.Context, tx *sql.Tx, id string) error
- func (db *DB) FindAllByService(ctx context.Context, serviceID string) ([]IntegrationKey, error)
- func (db *DB) FindOne(ctx context.Context, id string) (*IntegrationKey, error)
- func (db *DB) GetServiceID(ctx context.Context, id string, t Type) (string, error)
- type IntegrationKey
- type Store
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) Create ¶
func (db *DB) Create(ctx context.Context, i *IntegrationKey) (*IntegrationKey, error)
func (*DB) CreateKeyTx ¶
func (db *DB) CreateKeyTx(ctx context.Context, tx *sql.Tx, i *IntegrationKey) (*IntegrationKey, error)
func (*DB) DeleteManyTx ¶
func (*DB) FindAllByService ¶
type IntegrationKey ¶
type IntegrationKey struct { ID string `json:"id"` Name string `json:"name"` Type Type `json:"type"` ServiceID string `json:"service_id"` }
func (IntegrationKey) Normalize ¶
func (i IntegrationKey) Normalize() (*IntegrationKey, error)
type Store ¶
type Store interface { Authorize(ctx context.Context, id string, integrationType Type) (context.Context, error) GetServiceID(ctx context.Context, id string, integrationType Type) (string, error) Create(ctx context.Context, i *IntegrationKey) (*IntegrationKey, error) CreateKeyTx(context.Context, *sql.Tx, *IntegrationKey) (*IntegrationKey, error) FindOne(ctx context.Context, id string) (*IntegrationKey, error) FindAllByService(ctx context.Context, id string) ([]IntegrationKey, error) Delete(ctx context.Context, id string) error DeleteTx(ctx context.Context, tx *sql.Tx, id string) error DeleteManyTx(ctx context.Context, tx *sql.Tx, ids []string) error }
Click to show internal directories.
Click to hide internal directories.