config

package
v0.19.20 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnrollUrl, _ = url.Parse("/edge/client/v1/enroll")

Functions

This section is empty.

Types

type Config

type Config struct {
	ZtAPI       string          `json:"ztAPI"`
	ID          identity.Config `json:"id"`
	ConfigTypes []string        `json:"configTypes"`

	CaPool        *x509.CertPool
	AuthToken     string `json:"-"`
	Authenticator rest_util.Authenticator
}

func New

func New(ztApi string, idConfig identity.Config) *Config

func NewFromFile

func NewFromFile(confFile string) (*Config, error)

type EnrollmentClaims

type EnrollmentClaims struct {
	EnrollmentMethod string            `json:"em"`
	SignatureCert    *x509.Certificate `json:"-"`
	jwt.StandardClaims
}

func (*EnrollmentClaims) EnrolmentUrl

func (t *EnrollmentClaims) EnrolmentUrl() string

func (*EnrollmentClaims) ToMapClaims

func (t *EnrollmentClaims) ToMapClaims() (jwt.MapClaims, error)

func (EnrollmentClaims) Valid

func (t EnrollmentClaims) Valid() error

type Identity

type Identity struct {
	Type string `json:"type"`
	Id   string `json:"id"`
	Name string `json:"name"`
}

type KeyAlgVar added in v0.14.1

type KeyAlgVar string

func (*KeyAlgVar) EC added in v0.14.1

func (f *KeyAlgVar) EC() bool

func (*KeyAlgVar) Get added in v0.14.1

func (f *KeyAlgVar) Get() string

func (*KeyAlgVar) RSA added in v0.14.1

func (f *KeyAlgVar) RSA() bool

func (*KeyAlgVar) Set added in v0.14.1

func (f *KeyAlgVar) Set(value string) error

func (*KeyAlgVar) String added in v0.14.1

func (f *KeyAlgVar) String() string

func (*KeyAlgVar) Type added in v0.14.1

func (f *KeyAlgVar) Type() string

type Versions

type Versions struct {
	Api           string `json:"api"`
	EnrollmentApi string `json:"enrollmentApi"`
}

Jump to

Keyboard shortcuts

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