|
-
-
-
-
-
- package structs
-
- import (
- "encoding/base64"
- )
-
-
- func BasicAuthEncode(user, pass string) string {
- return base64.StdEncoding.EncodeToString([]byte(user + ":" + pass))
- }
-
-
-
- type AccessToken struct {
- ID int64 `json:"id"`
- Name string `json:"name"`
- Token string `json:"sha1"`
- TokenLastEight string `json:"token_last_eight"`
- }
-
-
-
- type AccessTokenList []*AccessToken
-
-
-
- type CreateAccessTokenOption struct {
- Name string `json:"name" binding:"Required"`
- }
|