Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
19
pkg/common/apitoken.go
Normal file
19
pkg/common/apitoken.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
"fiskerinc.com/modules/common/dbbasemodel"
|
||||
)
|
||||
|
||||
type APIToken struct {
|
||||
Token string `json:"token" validate:"required,max=1000" pg:",pk"`
|
||||
Roles string `json:"roles" validate:"required,max=10000"`
|
||||
Description string `json:"description" validate:"required,max=1000"`
|
||||
ExpiresAt *time.Time `json:"expires_at" pg:"expires_at"`
|
||||
dbbasemodel.DBModelBase
|
||||
}
|
||||
|
||||
func (a *APIToken) String() string {
|
||||
return fmt.Sprintf("APIToken<%s>", a.Token)
|
||||
}
|
||||
Reference in New Issue
Block a user