Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
GenerateToken generates a random token of specified length in bytes
Types ¶
type Filter ¶
type Order ¶
type Repository ¶
type Repository interface { Get(ctx context.Context, id uint64) (*model.DirectAccessToken, error) GetByToken(ctx context.Context, token string) (*model.DirectAccessToken, error) FetchList(ctx context.Context, filter *Filter, order *Order, page *repository.Pagination) ([]*model.DirectAccessToken, error) Count(ctx context.Context, filter *Filter) (int64, error) Generate(ctx context.Context, userID, accountID uint64, description string, expiresAt time.Time) (*model.DirectAccessToken, error) Revoke(ctx context.Context, filter *Filter) error }
type Usecase ¶
type Usecase interface { Get(ctx context.Context, id uint64) (*model.DirectAccessToken, error) FetchList(ctx context.Context, filter *Filter, order *Order, page *repository.Pagination) ([]*model.DirectAccessToken, error) Count(ctx context.Context, filter *Filter) (int64, error) Generate(ctx context.Context, userID, accountID uint64, description string, expiresAt time.Time) (*model.DirectAccessToken, error) Revoke(ctx context.Context, filter *Filter) error }
Click to show internal directories.
Click to hide internal directories.