util

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Functions

func InitializeLogger

func InitializeLogger()

Types

type BearerToken

type BearerToken struct {
	// contains filtered or unexported fields
}

func NewBearerToken

func NewBearerToken(token string) *BearerToken

func (*BearerToken) GetToken

func (b *BearerToken) GetToken() string

func (*BearerToken) IsExpired

func (b *BearerToken) IsExpired() bool

type RefreshAuthResponse

type RefreshAuthResponse struct {
	TokenType    string `json:"token_type"`
	ExpiresIn    int64  `json:"expires_in"`
	ExtExpiresIn int64  `json:"ext_expires_in"`
	AccessToken  string `json:"access_token"`
}

type TokenClient

type TokenClient struct {
	Token *BearerToken
	// contains filtered or unexported fields
}

func NewTokenClient

func NewTokenClient(authFunc func() (*RefreshAuthResponse, error)) *TokenClient

func (*TokenClient) RefreshAuth

func (c *TokenClient) RefreshAuth() error

Jump to

Keyboard shortcuts

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