service_token

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTokenResponse

type CreateTokenResponse struct {
	ID    string `json:"id" yaml:"id"`
	Token string `json:"token" yaml:"token"`
}

type ServiceToken

type ServiceToken struct {
	ID          string                `json:"id" yaml:"id"`
	UserID      string                `json:"userId" yaml:"userId"`
	Name        string                `json:"name" yaml:"name"`
	Description string                `json:"description" yaml:"description"`
	Token       Token                 `json:"token" yaml:"token"` // keeps hashed token, not the actual token
	NeverExpire bool                  `json:"neverExpire" yaml:"neverExpire"`
	ExpiresOn   dateTimeTY.CustomDate `json:"expiresOn" yaml:"expiresOn"`
	Labels      cmap.CustomStringMap  `json:"labels" yaml:"labels"`
	CreatedOn   time.Time             `json:"createdOn" yaml:"createdOn"`
}

type Token

type Token struct {
	ID    string `json:"id" yaml:"id"`
	Token string `json:"token" yaml:"token"`
}

func GetNewToken

func GetNewToken() Token

returns new token

func ParseToken

func ParseToken(rawToken string) (*Token, error)

func (*Token) GetTokenWithID

func (t *Token) GetTokenWithID() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL