providers

package
v0.0.0-...-9e1cc8c Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ORCH_PATH = "/v1/orchestrator"
View Source
const RegistryVersion = "/v1/"
View Source
const SystemName = "registry"

Variables

View Source
var (
	RoleType_name = map[int32]string{
		0: "OWNER",
		1: "ADMIN",
		2: "EMPLOYEE",
		3: "VENDOR",
		4: "USERS",
	}
	RoleType_value = map[string]int32{
		"OWNER":    0,
		"ADMIN":    1,
		"EMPLOYEE": 2,
		"VENDOR":   3,
		"USERS":    4,
	}
)

Enum value maps for RoleType.

Functions

func NewRegistryProvider

func NewRegistryProvider(icHost string, debug bool) *registryProvider

Types

type DeployOrgRequest

type DeployOrgRequest struct {
	OrgId   string   `path:"org_id" validate:"required"`
	OrgName string   `json:"org_name" validate:"required"`
	OwnerId string   `json:"owner_id" validate:"required"`
	Systems []System `json:"systems"`
}

type DeployOrgResponse

type DeployOrgResponse struct {
}

type DestroyOrgRequest

type DestroyOrgRequest struct {
	OrgId   string `path:"org_id" validate:"required"`
	OwnerId string `json:"owner_id" validate:"required"`
}

type DestroyOrgResponse

type DestroyOrgResponse struct {
}

type OrchestratorProvider

type OrchestratorProvider interface {
	DeployOrg(req DeployOrgRequest) (*DeployOrgResponse, error)
	DestroyOrg(req DestroyOrgRequest) (*DestroyOrgResponse, error)
}

OrchestratorClientProvider creates a local client to interact with a remote instance of Users service.

func NewOrchestratorProvider

func NewOrchestratorProvider(orchestratorHost string, debug bool) OrchestratorProvider

type OrgMember

type OrgMember struct {
	UserUuid string `example:"{{UserUUID}}" json:"user_uuid" validate:"required"`
	Role     string `example:"member" json:"role" validate:"required"`
}

type RegistryProvider

type RegistryProvider interface {
	AddMember(orgName string, uuid string) error
}

type RoleType

type RoleType int32
const (
	RoleType_OWNER    RoleType = 0
	RoleType_ADMIN    RoleType = 1
	RoleType_EMPLOYEE RoleType = 2
	RoleType_VENDOR   RoleType = 3
	RoleType_USERS    RoleType = 4
)

type System

type System struct {
	Name     string   `json:"system" validate:"required"`
	KeyValue []string `json:"keyvalue" validate:"required"`
}

type UserClientProvider

type UserClientProvider interface {
	GetClient() (pb.UserServiceClient, error)
}

UserClientProvider creates a local client to interact with a remote instance of Users service.

func NewUserClientProvider

func NewUserClientProvider(userHost string) UserClientProvider

Jump to

Keyboard shortcuts

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