config

package
v0.13.34 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = &Options{
	RefreshInterval: 5 * time.Minute,
	OnServiceUpdate: nil,
}

Functions

This section is empty.

Types

type Config

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

func New

func New(ztApi string, idConfig identity.IdentityConfig) *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 Options added in v0.13.0

type Options struct {
	RefreshInterval time.Duration
	OnServiceUpdate serviceCB
}

type ServiceEventType added in v0.13.0

type ServiceEventType string
const (
	ServiceAdded   ServiceEventType = "Added"
	ServiceRemoved ServiceEventType = "Removed"
	ServiceChanged ServiceEventType = "Changed"
)

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