managedapp

package
v0.0.0-...-5004fd2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Overview

Package managedapp provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(apiServer api.APIServer) *server

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type AgentConfig

type AgentConfig = agentConfigComposed

AgentConfig defines model for AgentConfig.

func (AgentConfig) GetVersion

func (cfg AgentConfig) GetVersion() string

GetVersion implements configmanager.VersionedConfig.

type AgentConfigDoc

type AgentConfigDoc struct {
	base.BaseDoc

	Version string `json:"version"`
}

func (*AgentConfigDoc) PopulateModel

func (d *AgentConfigDoc) PopulateModel(m *AgentConfig)

type AgentConfigFields

type AgentConfigFields struct {
	RefreshAfter time.Time `json:"refreshAfter"`
	Version      string    `json:"version"`
}

AgentConfigFields defines model for AgentConfigFields.

type AgentConfigRadius

type AgentConfigRadius = agentConfigRadiusComposed

AgentConfigRadius defines model for AgentConfigRadius.

type AgentConfigRadiusDoc

type AgentConfigRadiusDoc struct {
	AgentConfigDoc
	Container AgentContainerConfiguration   `json:"container"`
	Clients   []frconfig.RadiusClientConfig `json:"clients,omitempty"`
	DebugMode *bool                         `json:"debugMode,omitempty"`
	EapTls    frconfig.RadiusEapTls         `json:"eapTls"`
	Servers   []frconfig.RadiusServerConfig `json:"servers,omitempty"`
}

type AgentConfigRadiusFields

type AgentConfigRadiusFields struct {
	Clients   []externalRef0.RadiusClientConfig `json:"clients,omitempty"`
	Container *AgentContainerConfiguration      `json:"container,omitempty"`
	DebugMode *bool                             `json:"debugMode,omitempty"`
	EapTls    *externalRef0.RadiusEapTls        `json:"eapTls,omitempty"`
	Servers   []externalRef0.RadiusServerConfig `json:"servers,omitempty"`
}

AgentConfigRadiusFields defines model for AgentConfigRadiusFields.

type AgentConfigRadiusResponse

type AgentConfigRadiusResponse = AgentConfigRadius

AgentConfigRadiusResponse defines model for AgentConfigRadiusResponse.

type AgentConfigServer

type AgentConfigServer = agentConfigServerComposed

AgentConfigServer defines model for AgentConfigServer.

type AgentConfigServerDoc

type AgentConfigServerDoc struct {
	AgentConfigDoc
	GlobalKeyVaultEndpoint string            `json:"globalKeyVaultEndpoint"`
	GlobalACRImageRef      string            `json:"globalAcrImageRef"`
	TLSCertificatePolicyID base.ID           `json:"tlsCertificatePolicyId"`
	TLSCertificateID       base.ID           `json:"tlsCertificateId"`
	JWTKeyCertPolicyID     base.DocLocator   `json:"jwtKeyCertPolicyId"`
	JWTKeyCertIDs          []base.DocLocator `json:"jwtKeyCertIds"`
}

func ApiReadAgentConfigDoc

func ApiReadAgentConfigDoc(c ctx.RequestContext) (*AgentConfigServerDoc, error)

will wrap 404 if doc is not found

type AgentConfigServerEnv

type AgentConfigServerEnv struct {
	EnvVarAzureContainerRegistryImageRepository string `json:"AZURE_ACR_IMAGE_REPOSITORY"`
	EnvVarAzureKeyVaultResourceEndpoint         string `json:"AZURE_KEYVAULT_RESOURCEENDPOINT"`
	Message                                     string `json:"_message"`
}

AgentConfigServerEnv Environment variables for the agent config server, must be set manually

type AgentConfigServerFields

type AgentConfigServerFields struct {
	AzureACRImageRef string `json:"azureAcrImageRef"`

	// Env Environment variables for the agent config server, must be set manually
	Env                    AgentConfigServerEnv           `json:"env"`
	JWTKeyCertIDs          []externalRef1.ResourceLocator `json:"jwtKeyCertIds"`
	JwtKeyCertPolicyId     externalRef1.ResourceLocator   `json:"jwtKeyCertPolicyId"`
	TlsCertificateId       externalRef1.Id                `json:"tlsCertificateId"`
	TlsCertificatePolicyId externalRef1.Id                `json:"tlsCertificatePolicyId"`
}

AgentConfigServerFields defines model for AgentConfigServerFields.

type AgentContainerConfiguration

type AgentContainerConfiguration struct {
	ContainerName    string        `json:"containerName,omitempty"`
	Env              []string      `json:"env,omitempty"`
	ExposedPortSpecs []string      `json:"exposedPortSpecs"`
	HostBinds        []string      `json:"hostBinds"`
	ImageRepo        string        `json:"imageRepo"`
	ImageTag         string        `json:"imageTag"`
	NetworkName      string        `json:"networkName,omitempty"`
	Secrets          []SecretMount `json:"secrets,omitempty"`
}

AgentContainerConfiguration defines model for AgentContainerConfiguration.

type AgentInstance

type AgentInstance = agentInstanceComposed

AgentInstance defines model for AgentInstance.

type AgentInstanceDoc

type AgentInstanceDoc struct {
	base.BaseDoc
	AgentInstanceFields
}

func ApiReadAgentInstanceDoc

func ApiReadAgentInstanceDoc(c ctx.RequestContext, instanceID base.ID) (*AgentInstanceDoc, error)

wraps not found with 404

func (*AgentInstanceDoc) PopulateModel

func (d *AgentInstanceDoc) PopulateModel(r *AgentInstance)

type AgentInstanceFields

type AgentInstanceFields struct {
	BuildID  string    `json:"buildId"`
	Endpoint string    `json:"endpoint,omitempty"`
	Mode     AgentMode `json:"mode"`
	Version  string    `json:"version"`
}

AgentInstanceFields defines model for AgentInstanceFields.

type AgentInstanceQueryDoc

type AgentInstanceQueryDoc struct {
	base.QueryBaseDoc
	AgentInstanceFields
}

type AgentMode

type AgentMode string

AgentMode defines model for AgentMode.

const (
	AgentModeLauncher AgentMode = "launcher"
	AgentModeServer   AgentMode = "server"
)

Defines values for AgentMode.

type CreateManagedAppJSONRequestBody

type CreateManagedAppJSONRequestBody = ManagedAppParameters

CreateManagedAppJSONRequestBody defines body for CreateManagedApp for application/json ContentType.

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type ManagedApp

type ManagedApp = ManagedAppRef

ManagedApp defines model for ManagedApp.

type ManagedAppDoc

type ManagedAppDoc struct {
	profile.ProfileDoc
	ApplicationID        uuid.UUID `json:"applicationId"`
	ServicePrincipalID   uuid.UUID `json:"servicePrincipalId"`
	ServicePrincipalType string    `json:"servicePrincipalType,omitempty"`
}

func (*ManagedAppDoc) GetAppID

func (d *ManagedAppDoc) GetAppID() uuid.UUID

func (*ManagedAppDoc) Init

func (d *ManagedAppDoc) Init(appID uuid.UUID, displayName string, name string)

func (*ManagedAppDoc) PopulateModel

func (d *ManagedAppDoc) PopulateModel(m *ManagedApp)

func (*ManagedAppDoc) PopulateModelRef

func (d *ManagedAppDoc) PopulateModelRef(m *ManagedAppRef)

type ManagedAppIdParameter

type ManagedAppIdParameter = openapi_types.UUID

ManagedAppIdParameter defines model for ManagedAppIdParameter.

type ManagedAppParameters

type ManagedAppParameters struct {
	DisplayName                  string `json:"displayName"`
	SkipServicePrincipalCreation *bool  `json:"skipServicePrincipalCreation,omitempty"`
}

ManagedAppParameters defines model for ManagedAppParameters.

type ManagedAppQueryDoc

type ManagedAppQueryDoc struct {
	profile.ProfileQueryDoc
	ApplicationID        uuid.UUID `json:"applicationId"`
	ServicePrincipalID   uuid.UUID `json:"servicePrincipalId"`
	ServicePrincipalType *string   `json:"servicePrincipalType,omitempty"`
}

func (*ManagedAppQueryDoc) PopulateModelRef

func (d *ManagedAppQueryDoc) PopulateModelRef(r *ManagedAppRef)

type ManagedAppRef

type ManagedAppRef = managedAppRefComposed

ManagedAppRef defines model for ManagedAppRef.

type ManagedAppRefFields

type ManagedAppRefFields struct {
	AppID openapi_types.UUID `json:"appId"`

	// ApplicationId Object ID
	ApplicationID        openapi_types.UUID `json:"applicationId"`
	ServicePrincipalID   openapi_types.UUID `json:"servicePrincipalId"`
	ServicePrincipalType string             `json:"servicePrincipalType,omitempty"`
}

ManagedAppRefFields defines model for ManagedAppRefFields.

type PatchAgentConfigRadiusJSONRequestBody

type PatchAgentConfigRadiusJSONRequestBody = AgentConfigRadiusFields

PatchAgentConfigRadiusJSONRequestBody defines body for PatchAgentConfigRadius for application/json ContentType.

type PutAgentConfigServerJSONRequestBody

type PutAgentConfigServerJSONRequestBody = AgentConfigServerFields

PutAgentConfigServerJSONRequestBody defines body for PutAgentConfigServer for application/json ContentType.

type ResourceReference

type ResourceReference = base.ResourceReference

type SecretMount

type SecretMount struct {
	Source     string `json:"source"`
	TargetName string `json:"targetName"`
}

SecretMount defines model for SecretMount.

type ServerInterface

type ServerInterface interface {
	// List managed apps
	// (GET /v1/managed-app)
	ListManagedApps(ctx echo.Context) error
	// Create a managed app
	// (POST /v1/managed-app)
	CreateManagedApp(ctx echo.Context) error
	// Get managed app
	// (GET /v1/managed-app/{managedAppId})
	GetManagedApp(ctx echo.Context, managedAppId ManagedAppIdParameter) error
	// Sync managed app
	// (POST /v1/managed-app/{managedAppId})
	SyncManagedApp(ctx echo.Context, managedAppId ManagedAppIdParameter) error
	// Get agent config radius
	// (GET /v1/{namespaceKind}/{namespaceId}/agent-config/radius)
	GetAgentConfigRadius(ctx echo.Context, namespaceKind externalRef1.NamespaceKindParameter, namespaceId externalRef1.NamespaceIdParameter) error
	// Patch agent config radius
	// (PATCH /v1/{namespaceKind}/{namespaceId}/agent-config/radius)
	PatchAgentConfigRadius(ctx echo.Context, namespaceKind externalRef1.NamespaceKindParameter, namespaceId externalRef1.NamespaceIdParameter) error
	// Get agent config server
	// (GET /v1/{namespaceKind}/{namespaceId}/agent-config/server)
	GetAgentConfigServer(ctx echo.Context, namespaceKind externalRef1.NamespaceKindParameter, namespaceId externalRef1.NamespaceIdParameter) error
	// Put agent config server
	// (PUT /v1/{namespaceKind}/{namespaceId}/agent-config/server)
	PutAgentConfigServer(ctx echo.Context, namespaceKind externalRef1.NamespaceKindParameter, namespaceId externalRef1.NamespaceIdParameter) error
	// List agent config server instances
	// (GET /v1/{namespaceKind}/{namespaceId}/agent/instance)
	ListAgentInstances(ctx echo.Context, namespaceKind externalRef1.NamespaceKindParameter, namespaceId externalRef1.NamespaceIdParameter) error
	// Get agent config server instance
	// (GET /v1/{namespaceKind}/{namespaceId}/agent/instance/{resourceId})
	GetAgentInstance(ctx echo.Context, namespaceKind externalRef1.NamespaceKindParameter, namespaceId externalRef1.NamespaceIdParameter, resourceId externalRef1.ResourceIdParameter) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateManagedApp

func (w *ServerInterfaceWrapper) CreateManagedApp(ctx echo.Context) error

CreateManagedApp converts echo context to params.

func (*ServerInterfaceWrapper) GetAgentConfigRadius

func (w *ServerInterfaceWrapper) GetAgentConfigRadius(ctx echo.Context) error

GetAgentConfigRadius converts echo context to params.

func (*ServerInterfaceWrapper) GetAgentConfigServer

func (w *ServerInterfaceWrapper) GetAgentConfigServer(ctx echo.Context) error

GetAgentConfigServer converts echo context to params.

func (*ServerInterfaceWrapper) GetAgentInstance

func (w *ServerInterfaceWrapper) GetAgentInstance(ctx echo.Context) error

GetAgentInstance converts echo context to params.

func (*ServerInterfaceWrapper) GetManagedApp

func (w *ServerInterfaceWrapper) GetManagedApp(ctx echo.Context) error

GetManagedApp converts echo context to params.

func (*ServerInterfaceWrapper) ListAgentInstances

func (w *ServerInterfaceWrapper) ListAgentInstances(ctx echo.Context) error

ListAgentInstances converts echo context to params.

func (*ServerInterfaceWrapper) ListManagedApps

func (w *ServerInterfaceWrapper) ListManagedApps(ctx echo.Context) error

ListManagedApps converts echo context to params.

func (*ServerInterfaceWrapper) PatchAgentConfigRadius

func (w *ServerInterfaceWrapper) PatchAgentConfigRadius(ctx echo.Context) error

PatchAgentConfigRadius converts echo context to params.

func (*ServerInterfaceWrapper) PutAgentConfigServer

func (w *ServerInterfaceWrapper) PutAgentConfigServer(ctx echo.Context) error

PutAgentConfigServer converts echo context to params.

func (*ServerInterfaceWrapper) SyncManagedApp

func (w *ServerInterfaceWrapper) SyncManagedApp(ctx echo.Context) error

SyncManagedApp converts echo context to params.

Jump to

Keyboard shortcuts

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