tokencache

package
v3.0.0-beta10 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(contextName string) error

func Exists

func Exists(contextName string) bool

func FmtFilename

func FmtFilename(contextName string) string

func GetAll

func GetAll() map[string]Entry

func ModTime

func ModTime(contextName string) (time.Time, error)

func ReconnectError

func ReconnectError(srcErr error, contextName string) error

func Save

func Save(contextName string, token Entry) error

Types

type Entry

type Entry struct {
	AccessTokenExpire   time.Time          `json:"access_expired_at"`
	AccessToken         string             `json:"access_token"`
	AccessTokenDuration *duration.Duration `json:"access_token_duration,omitempty"`
	RefreshTokenExpire  time.Time          `json:"refresh_expired_at"`
	RefreshToken        string             `json:"refresh_token"`
}

func GetLast

func GetLast() (string, Entry)

func Load

func Load(contextName string) (*Entry, error)

Jump to

Keyboard shortcuts

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