generic

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: ISC Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKeyIdentityDef

func APIKeyIdentityDef() *eventline.IdentityDef

func GPGKeyIdentityDef added in v1.0.0

func GPGKeyIdentityDef() *eventline.IdentityDef

func OAuth2IdentityDef

func OAuth2IdentityDef() *eventline.IdentityDef

func PasswordIdentityDef

func PasswordIdentityDef() *eventline.IdentityDef

func SSHKeyIdentityDef

func SSHKeyIdentityDef() *eventline.IdentityDef

Types

type APIKeyIdentity

type APIKeyIdentity struct {
	Key string `json:"key"`
}

func (*APIKeyIdentity) Def

func (*APIKeyIdentity) Environment

func (i *APIKeyIdentity) Environment() map[string]string

func (*APIKeyIdentity) ValidateJSON added in v1.1.0

func (i *APIKeyIdentity) ValidateJSON(v *ejson.Validator)

type Connector

type Connector struct {
	Def *eventline.ConnectorDef
	Cfg *ConnectorCfg
	Log *log.Logger
}

func NewConnector

func NewConnector() *Connector

func (*Connector) DefaultCfg

func (c *Connector) DefaultCfg() eventline.ConnectorCfg

func (*Connector) Definition

func (c *Connector) Definition() *eventline.ConnectorDef

func (*Connector) Init

func (*Connector) Name

func (c *Connector) Name() string

func (*Connector) Terminate

func (c *Connector) Terminate()

type ConnectorCfg

type ConnectorCfg struct {
	Secret string `json:"secret"`
}

func (*ConnectorCfg) ValidateJSON added in v1.1.0

func (cfg *ConnectorCfg) ValidateJSON(v *ejson.Validator)

type GPGKeyIdentity added in v1.0.0

type GPGKeyIdentity struct {
	PrivateKey string `json:"private_key,omitempty"`
	PublicKey  string `json:"public_key,omitempty"`
	Password   string `json:"password,omitempty"`
}

func (*GPGKeyIdentity) Def added in v1.0.0

func (*GPGKeyIdentity) Environment added in v1.0.0

func (i *GPGKeyIdentity) Environment() map[string]string

func (*GPGKeyIdentity) ValidateJSON added in v1.1.0

func (i *GPGKeyIdentity) ValidateJSON(v *ejson.Validator)

type OAuth2Identity

type OAuth2Identity struct {
	Issuer                string   `json:"issuer"`
	Discovery             bool     `json:"discovery,omitempty"`
	DiscoveryEndpoint     string   `json:"discovery_endpoint,omitempty"`
	AuthorizationEndpoint string   `json:"authorization_endpoint,omitempty"`
	TokenEndpoint         string   `json:"token_endpoint,omitempty"`
	ClientId              string   `json:"client_id"`
	ClientSecret          string   `json:"client_secret"`
	Scopes                []string `json:"scopes"`

	AccessToken    string     `json:"access_token,omitempty"`
	RefreshToken   string     `json:"refresh_token,omitempty"`
	TTL            int        `json:"ttl"`
	ExpirationTime *time.Time `json:"expiration_time,omitempty"`
}

func (*OAuth2Identity) Def

func (*OAuth2Identity) Environment

func (i *OAuth2Identity) Environment() map[string]string

func (*OAuth2Identity) FetchTokenData

func (i *OAuth2Identity) FetchTokenData(httpClient *http.Client, code, redirectionURI string) error

func (*OAuth2Identity) RedirectionURI

func (i *OAuth2Identity) RedirectionURI(httpClient *http.Client, state, redirectionURI string) (string, error)

func (*OAuth2Identity) Refresh

func (i *OAuth2Identity) Refresh(httpClient *http.Client) error

func (*OAuth2Identity) RefreshTime

func (i *OAuth2Identity) RefreshTime() time.Time

func (*OAuth2Identity) ValidateJSON added in v1.1.0

func (i *OAuth2Identity) ValidateJSON(v *ejson.Validator)

type PasswordIdentity

type PasswordIdentity struct {
	Login    string `json:"login,omitempty"`
	Password string `json:"password"`
}

func (*PasswordIdentity) Def

func (*PasswordIdentity) Environment

func (i *PasswordIdentity) Environment() map[string]string

func (*PasswordIdentity) ValidateJSON added in v1.1.0

func (i *PasswordIdentity) ValidateJSON(v *ejson.Validator)

type SSHKeyIdentity

type SSHKeyIdentity struct {
	PrivateKey  string `json:"private_key"`
	PublicKey   string `json:"public_key,omitempty"`
	Certificate string `json:"certificate,omitempty"`
}

func (*SSHKeyIdentity) Def

func (*SSHKeyIdentity) Environment

func (i *SSHKeyIdentity) Environment() map[string]string

func (*SSHKeyIdentity) ValidateJSON added in v1.1.0

func (i *SSHKeyIdentity) ValidateJSON(v *ejson.Validator)

Jump to

Keyboard shortcuts

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