config

package
v0.0.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigNotFound = errors.New("config file not found")
	ErrUserNotFound   = errors.New("user not found")
)

Functions

func SaveUser

func SaveUser(filename string, user *User) error

func UserList

func UserList(filename string) ([]string, error)

Types

type Config

type Config struct {
	Users []*User `yaml:"users"`
}

type User

type User struct {
	Name         string   `yaml:"name"`
	IssuerURL    string   `yaml:"issuer_url"`
	ClientID     string   `yaml:"client_id"`
	ExtraScopes  []string `yaml:"extra_scopes"`
	GrantType    string   `yaml:"grant_type"`
	IDToken      string   `yaml:"id_token,omitempty"`
	AccessToken  string   `yaml:"access_token,omitempty"`
	RefreshToken string   `yaml:"refresh_token"`
}

func FindUser

func FindUser(filename string, username string) (*User, error)

Jump to

Keyboard shortcuts

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