appdata

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(config Config) error

Set writes the given config to the user's config file. The config can be a partial config, and it is merged with the existing config.

Types

type Config

type Config struct {
	Token Token `json:"token"`
}

IMPORTANT: Do not modify the JSON labels in this struct without ensuring backwards compatibility, since those strings are written to the user's config file on their computer.

func Get

func Get() (Config, error)

Get returns the user's existing config, or an empty config if the file doesn't exist.

type Token

type Token struct {
	Iss string `json:"iss"`
	Sub string `json:"sub"`
	Aud string `json:"aud"`
	Iat int    `json:"iat"`
	Exp int    `json:"exp"`
}

Token represents a JWT token.

Jump to

Keyboard shortcuts

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