authenticator

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertEntityToProto

func ConvertEntityToProto(entity *Entity) *authenticator_pb.Entity

Types

type Authenticator

type Authenticator struct {
	// contains filtered or unexported fields
}

func NewAuthenticator

func NewAuthenticator(options *Options) *Authenticator

func NewAuthenticatorWithClient

func NewAuthenticatorWithClient(client *core.Client, options *Options) *Authenticator

func (*Authenticator) Authenticate

func (auth *Authenticator) Authenticate(appID string, token []byte) (*Entity, error)

func (*Authenticator) Connect

func (auth *Authenticator) Connect(host string, options *core.Options) error

func (*Authenticator) CreateEntity

func (auth *Authenticator) CreateEntity(entity *Entity) error

func (*Authenticator) DeleteEntity

func (auth *Authenticator) DeleteEntity(appID string) error

func (*Authenticator) Disconnect

func (auth *Authenticator) Disconnect()

func (*Authenticator) GetChannel

func (auth *Authenticator) GetChannel() (string, error)

func (*Authenticator) GetEndpoint

func (auth *Authenticator) GetEndpoint() (*core.Endpoint, error)

func (*Authenticator) GetEntities

func (auth *Authenticator) GetEntities(startID string, count int32) ([]*Entity, int32, error)

func (*Authenticator) GetEntity

func (auth *Authenticator) GetEntity(appID string) (*Entity, error)

func (*Authenticator) UpdateEntity

func (auth *Authenticator) UpdateEntity(entity *Entity) error

func (*Authenticator) UpdateEntityKey

func (auth *Authenticator) UpdateEntityKey(appID string, key string) error

type Entity

type Entity struct {
	AppID      string                 `json:"appID"`
	AppName    string                 `json:"appName"`
	AccessKey  string                 `json:"accessKey"`
	Properties map[string]interface{} `json:"props"`
}

func NewEntity

func NewEntity() *Entity

func ParseEntityProto

func ParseEntityProto(pbEntity *authenticator_pb.Entity) (*Entity, error)

type Options

type Options struct {
	Endpoint string
	Domain   string
	Verbose  bool
	Channel  string
	Key      *keyring.KeyInfo
}

func NewOptions

func NewOptions() *Options

func (*Options) GetChannel

func (options *Options) GetChannel() string

Jump to

Keyboard shortcuts

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