Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAPIKey = errs.Class("no api key")
ErrNoAPIKey represents no api key error.
View Source
var ( // ErrService defines secret service error. ErrService = errs.Class("secret service") )
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type APIKey struct { // APIKeys is PK of the table and keeps unique value sno api key. Secret multinodeauth.Secret CreatedAt time.Time `json:"createdAt"` }
APIKey describing api key in the database.
type DB ¶
type DB interface { // Store stores api key into db. Store(ctx context.Context, apiKey APIKey) error // Check checks if api key exists in db by secret. Check(ctx context.Context, secret multinodeauth.Secret) error // Revoke removes api key from db. Revoke(ctx context.Context, secret multinodeauth.Secret) error }
DB is interface for working with api keys.
architecture: Database
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service responsible for operations with storagenode's uniq secret.
architecture: Service
Click to show internal directories.
Click to hide internal directories.