httpserver

package
v0.0.0-...-e163d20 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpServer

func NewHttpServer(configuration ConfigurationSet, secrets SecretsSet, access AccessSet, dashboard DashboardSet, notify NotifSet, permissions PermissionsBuilder) *httpServer

Types

type AccessEndpoints

type AccessEndpoints interface {
	GenerateAccessKeyHandler(w http.ResponseWriter, r *http.Request)
	DeleteAccessKeysHandler(w http.ResponseWriter, r *http.Request)
}

type AccessService

type AccessService interface {
	GetAccessKeyPermissions(ctx context.Context, key string) (*permissions.AccessKeyPermissions, bool, error)
	GenerateAccessKey(ctx context.Context, accessKeyPerms dto.AccessKeyPermissionsDto) (dto.AccessKeyPermissionsDto, error)
	DeleteAccessKeys(ctx context.Context, keys []string) error
}

type AccessSet

type AccessSet interface {
	AccessService
	AccessEndpoints
}

access

type ConfigurationEndpoints

type ConfigurationEndpoints interface {
	CloneConfigHandler(w http.ResponseWriter, r *http.Request)
	ReadConfigHandler(w http.ResponseWriter, r *http.Request)
	DeleteConfigHandler(w http.ResponseWriter, r *http.Request)
}

type ConfigurationService

type ConfigurationService interface {
	IsEnvOriginal(ctx context.Context, env string) bool
	GetEnvOriginal(ctx context.Context, env string) (string, bool, error)
}

type ConfigurationSet

type ConfigurationSet interface {
	ConfigurationService
	ConfigurationEndpoints
}

configuration

type DashboardEndpoints

type DashboardEndpoints interface {
	HomeHandler(w http.ResponseWriter, r *http.Request)
	ConfigHandler(w http.ResponseWriter, r *http.Request)
	AccessHandler(w http.ResponseWriter, r *http.Request)
	CreateAccessKeyParamsHandler(w http.ResponseWriter, r *http.Request)
	CreateAccessKeyHandler(w http.ResponseWriter, r *http.Request)
	DeleteAccessKeyHandler(w http.ResponseWriter, r *http.Request)
}

type DashboardSet

type DashboardSet interface {
	DashboardEndpoints
}

dashboard

type Handlers

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

func (Handlers) HealthCheckHandler

func (e Handlers) HealthCheckHandler(w http.ResponseWriter, r *http.Request)

func (Handlers) ReadinessCheckHandler

func (e Handlers) ReadinessCheckHandler(w http.ResponseWriter, r *http.Request)

type NotifSet

type NotifSet interface {
	NotifyEndpoints
}

notif

type NotifyEndpoints

type NotifyEndpoints interface {
	NotifyHandler(w http.ResponseWriter, r *http.Request)
}

type PermissionsBuilder

type PermissionsBuilder interface {
	NewAccessKeyPermissions() *permissions.AccessKeyPermissions
}

other

type SecretsEndpoints

type SecretsEndpoints interface {
	UpsertSecretsHandler(w http.ResponseWriter, r *http.Request)
}

type SecretsService

type SecretsService interface {
	UpsertSecrets(ctx context.Context, env string, secrets map[string]interface{}) error
}

type SecretsSet

type SecretsSet interface {
	SecretsService
	SecretsEndpoints
}

secrets

Jump to

Keyboard shortcuts

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