admin

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

func LoadHandlers

func LoadHandlers(orchestratorUrl string, client Client) func(router *mux.Router)

Types

type Application

type Application struct {
	ID            string
	IntegrationId string
	ObjectId      string
	Name          string
	Description   string
	ProviderName  string
	Service       string
}

type ApplicationsHandler

type ApplicationsHandler interface {
	List(w http.ResponseWriter, r *http.Request)
	Show(w http.ResponseWriter, r *http.Request)
	Edit(w http.ResponseWriter, r *http.Request)
	Update(w http.ResponseWriter, r *http.Request)
	Policies(w http.ResponseWriter, r *http.Request)
}

func NewApplicationsHandler

func NewApplicationsHandler(orchestratorUrl string, client Client) ApplicationsHandler

type Check

type Check struct {
	Name string `json:"name"`
	Pass string `json:"pass"`
}

type Client

type Client interface {
	Health() (string, error)
	Integrations() ([]Integration, error)
	CreateIntegration(name string, provider string, key []byte) error
	DeleteIntegration(id string) error
	Applications(refresh bool) ([]Application, error)
	Application(id string) (Application, error)
	GetPolicies(id string) ([]hexapolicy.PolicyInfo, string, error)
	SetPolicies(id string, policies string) error
	Orchestration(from string, to string) error
	GetHttpClient() HTTPClient
}

func NewOrchestratorClient

func NewOrchestratorClient(client HTTPClient, url string) Client

NewOrchestratorClient returns a handle to a client that calls the Orchestrator service. When `client` is specified it will override OAuth2 token support.

type HTTPClient

type HTTPClient interface {
	Get(url string) (resp *http.Response, err error)
	Do(req *http.Request) (*http.Response, error)
}

type Integration

type Integration struct {
	ID       string
	Name     string
	Provider string
	Key      []byte
}

type IntegrationHandler

type IntegrationHandler interface {
	List(w http.ResponseWriter, r *http.Request)
	New(w http.ResponseWriter, r *http.Request)
	CreateIntegration(w http.ResponseWriter, r *http.Request)
	Delete(w http.ResponseWriter, r *http.Request)
}

func NewIntegrationsHandler

func NewIntegrationsHandler(orchestratorUrl string, client Client) IntegrationHandler

type IntegrationProviderInterface

type IntegrationProviderInterface interface {
	// contains filtered or unexported methods
}

type OrchestrationHandler

type OrchestrationHandler interface {
	New(w http.ResponseWriter, r *http.Request)
	Update(w http.ResponseWriter, r *http.Request)
}

func NewOrchestrationHandler

func NewOrchestrationHandler(orchestratorUrl string, client Client) OrchestrationHandler

type Status

type Status struct {
	URL    string
	Checks []Check
}

type StatusHandler

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

func NewStatusHandler

func NewStatusHandler(orchestratorUrl string, client Client) StatusHandler

func (StatusHandler) StatusHandler

func (p StatusHandler) StatusHandler(w http.ResponseWriter, _ *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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