config

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAPIURL = "https://airskills.ai"
)

Variables

This section is empty.

Functions

func ClearToken

func ClearToken() error

func Dir

func Dir() (string, error)

func SaveToken

func SaveToken(token *TokenData) error

func WithTokenLock added in v0.6.13

func WithTokenLock(fn func() error) error

Types

type Config

type Config struct {
	APIURL   string `json:"api_url"`
	Skillset string `json:"skillset,omitempty"`
}

func Load

func Load() (*Config, error)

func (*Config) Save

func (c *Config) Save() error

type TokenData

type TokenData struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresAt    int64  `json:"expires_at"`
}

func LoadToken

func LoadToken() (*TokenData, error)

Jump to

Keyboard shortcuts

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