config

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthenticationServer = "AuthenticationServer"
	Eana360Server        = "Eana360Endpoint"
	Eana360FarmId        = "CurrentFarm"
)

Variables

View Source
var ErrValueNotFound = eris.New("value not found for key")

Functions

func Delete

func Delete(key string) error

func Dump

func Dump() (map[string][]byte, error)

func GetValue

func GetValue(key string) ([]byte, error)

func Load

func Load(key string, response interface{}) error

func Must

func Must(key string, driver display.Driver) string

Must return a string or fails gracefully

func PreVerify

func PreVerify(cmd *cobra.Command)

func Store

func Store(key string, payload interface{}) error

func WriteValue

func WriteValue(key string, value []byte) error

Types

type Config

type Config struct {
	Server       string       `json:"server"`
	Token        string       `json:"token"`
	ClientId     string       `json:"client_id"`
	ClientSecret string       `json:"client_secret"`
	Authorizer   string       `json:"authorizer"`
	Audience     string       `json:"audience"`
	Type         string       `json:"type"`
	SignedToken  *SignedToken `json:"signed_token"`
}

type SignedToken

type SignedToken struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token,omitempty"`
	Scope        string `json:"scope,omitempty"`
	ExpiresIn    int64  `json:"expires_in,omitempty"`
	TokenType    string `json:"token_type"`
}

func (*SignedToken) Unpack

func (tkn *SignedToken) Unpack() (*jwt.StandardClaims, error)

Jump to

Keyboard shortcuts

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