auth

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiKey

func ApiKey() string

func ApiUrl

func ApiUrl() string

func CommunityMode added in v1.0.0

func CommunityMode() bool

func Configure

func Configure(m Config) error

func DefaultApiUrl

func DefaultApiUrl() string

func DefaultCommunityApiUrl added in v1.0.0

func DefaultCommunityApiUrl() string

func DefaultControlPlaneApiUrl

func DefaultControlPlaneApiUrl() string

func DefaultSyncApiUrl added in v1.1.0

func DefaultSyncApiUrl() string

func NewTrialRegistrationClient

func NewTrialRegistrationClient(config TrialConfig) *trialRegistrationClient

func Verify

func Verify(config *VerifyConfig) error

Verify function takes config and current API key available from this package and returns an error if auth is invalid

Types

type Config

type Config struct {
	ApiUrl             string `yaml:"api_url"`
	ApiKey             string `yaml:"api_key"`
	Community          bool   `yaml:"community"`
	ControlPlaneApiUrl string `yaml:"cp_api_url"`
	SyncApiUrl         string `yaml:"sync_api_url"`
}

type TrialConfig

type TrialConfig struct {
	Email              string
	ControlPlaneApiUrl string
}

type VerifyConfig

type VerifyConfig struct {
	ControlPlaneApiUrl string
}

Jump to

Keyboard shortcuts

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