18 lines
445 B
Go
18 lines
445 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type Token struct {
|
|
// ID is the unique identifier of the token
|
|
ID string `json:"id"`
|
|
// Name is the user-friendly name of the token.
|
|
Name string `json:"name"`
|
|
// Value is the actual token.
|
|
Value string `json:"value"`
|
|
// CreatedAt is when the token was created (initialized by the storage)
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
|
|
// UserID of the user that created the token.
|
|
UserID *string `json:"-"`
|
|
}
|