services

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AmsServerPath        = "authorization"
	AmsBundleGatewayPath = "bundle-gateway"

	MegacliteID                   = "dwc-megaclite-ams-instance-id"
	MegacliteAmsServerPath        = "/ams/proxy/"
	MegacliteAmsBundleGatewayPath = "/ams/bundle/"
)

Variables

View Source
var (
	ErrServiceNotFound = errors.New("service not found")
)

Functions

This section is empty.

Types

type IASCredentials

type IASCredentials struct {
	Certificate          string    `json:"certificate" validate:"required"`
	CertificateExpiresAt time.Time `json:"certificate_expires_at"`
	ClientID             string    `json:"clientid"`
	Domain               string    `json:"domain"`
	Domains              []string  `json:"domains"`
	Key                  string    `json:"key" validate:"required"`
	OsbURL               string    `json:"osb_url"`
	ProoftokenURL        string    `json:"prooftoken_url"`
	URL                  string    `json:"url"`
	ZoneUUID             string    `json:"zone_uuid"`

	AmsInstanceID string `json:"authorization_instance_id"  validate:"required"`
	AmsClientID   string `json:"authorization_client_id"`

	// derived values
	AmsServerURL        string `json:"-"`
	AmsBundleGatewayURL string `json:"-"`
}

func LoadServiceCredentials added in v0.4.1

func LoadServiceCredentials(log Logger) (*IASCredentials, error)

type Logger

type Logger interface {
	Info(format string, args ...interface{})
	Error(format string, args ...interface{})
}

type MegacliteCredentials added in v0.4.1

type MegacliteCredentials struct {
	URL string `json:"url"`
}

type Service

type Service struct {
	Name        string          `json:"name"`
	Tags        []string        `json:"tags"`
	Credentials json.RawMessage `json:"credentials"`
	InstanceID  string          `json:"instance_guid"`
}

func LoadService

func LoadService(log Logger, serviceName string) (*Service, error)

Jump to

Keyboard shortcuts

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