Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSecret = errs.Class("no secret error")
ErrNoSecret represents errors from the secret database.
View Source
var ErrSecretService = errs.Class("secret service error")
ErrSecretService defines secret service error.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { // Store stores secret token into db. Store(ctx context.Context, secret UniqSecret) error // Check checks if uniq secret exists in db by token. Check(ctx context.Context, token uuid.UUID) (_ bool, err error) // Revoke removes token from db. Revoke(ctx context.Context, token uuid.UUID) error }
DB is interface for working with secret tokens.
architecture: Database
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service responsible for operations with storagenode's uniq secret.
architecture: Service
type Token ¶
type Token [32]byte
Token stores secret of sno token.
func TokenSecretFromBase64 ¶
TokenSecretFromBase64 creates new secret token from base64 string.
type UniqSecret ¶
type UniqSecret struct { // Secret is PK of the table and keeps unique value sno secret token Secret Token CreatedAt time.Time `json:"createdAt"` }
UniqSecret describing secret model in the database.
Click to show internal directories.
Click to hide internal directories.