Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct { Id uuid.UUID `gorm:"type:uuid;default:gen_random_uuid()" json:"id"` Name string `json:"name"` Token string `json:"-"` UserId uuid.UUID `json:"-"` CreatedAt time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` LastSeen *time.Time `json:"last_seen"` DeletedAt *time.Time `json:"deleted_at"` ExpiresAt *time.Time `json:"expires_at"` }
type Repository ¶
type Repository interface { List(userId uuid.UUID) ([]AccessToken, error) FindById(tokenId uuid.UUID) (*AccessToken, error) FindByToken(token string) (*AccessToken, error) Create(token *AccessToken) (*AccessToken, error) Update(token *AccessToken) (*AccessToken, error) Delete(tokenId uuid.UUID) error }
func New ¶
func New(db *gorm.DB) Repository
Click to show internal directories.
Click to hide internal directories.