handler

package
v0.0.0-...-c8940be Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespondWithError

func RespondWithError(w http.ResponseWriter, err error, code int)

Types

type BasicInfoHandler

type BasicInfoHandler struct {
	Mux *http.ServeMux
}

func NewBasicInfoHandler

func NewBasicInfoHandler(ctx context.Context) *BasicInfoHandler

func (*BasicInfoHandler) ServeHTTP

func (h *BasicInfoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ChangSetSummaryItem

type ChangSetSummaryItem struct {
	ResourceName      string `json:"resource_name"`
	ResourceType      string `json:"resource_type"`
	ResourceContainer string `json:"resource_container"`
}

type ChangeSetSummary

type ChangeSetSummary struct {
	Added   []ChangSetSummaryItem `json:"added"`
	Removed []ChangSetSummaryItem `json:"removed"`
	Updated []ChangSetSummaryItem `json:"updated"`
}

type CollectionHandler

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

func NewCollectionHandler

func NewCollectionHandler(mongoClient *mongo.Client) *CollectionHandler

func (*CollectionHandler) ServeHTTP

func (ch *CollectionHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type NodeIdentifiable

type NodeIdentifiable interface {
	SetNodeAndResourceID(nodeName string) error
	GetResourceID() (string, error)
}

func IdentifiablesFromBGPConfigs

func IdentifiablesFromBGPConfigs(bgpConfigs []pkgbird.BGPProtocol) []NodeIdentifiable

func IdentifiablesFromWgConfigs

func IdentifiablesFromWgConfigs(wgConfigs []pkginterfacewireguard.WireGuardConfig) []NodeIdentifiable

type ReconvergeStatus

type ReconvergeStatus struct {
	Converged bool    `json:"converged"`
	Error     *string `json:"error,omitempty"`
}

type ResourceHandler

type ResourceHandler struct {
	Mux *http.ServeMux
}

func NewResourceHandler

func NewResourceHandler(ctx context.Context) *ResourceHandler

func (*ResourceHandler) ServeHTTP

func (h *ResourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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