admin

package
v0.0.0-...-35b3a18 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppListEntry

type AppListEntry struct {
	App      string `json:"app"`
	Endpoint string `json:"endpoint"`
	Peer     string `json:"peer"`
}

AppListEntry represents an entry on app list

type ConsentGatherer

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

ConsentGatherer is a mediator between ServerAcceptor and HTTP server that is used to accept or reject the requests

func NewConsentGatherer

func NewConsentGatherer() *ConsentGatherer

NewConsentGatherer creates ConsentGatherer instances

func (*ConsentGatherer) Ask

func (gatherer *ConsentGatherer) Ask(cert *rsa.PublicKey) (chan bool, error)

Ask returns a channel, that determines if consent was given or not, after the user responds

type ServerAcceptor

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

ServerAcceptor implements Acceptor by waiting for the user to manually accept the public key

func NewServerAcceptor

func NewServerAcceptor(gatherer *ConsentGatherer) *ServerAcceptor

NewServerAcceptor creates ServerAcceptor instances

func (*ServerAcceptor) IsTrusted

func (a *ServerAcceptor) IsTrusted(cert *rsa.PublicKey) (bool, error)

IsTrusted implements Acceptor

type WormholeAdminServer

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

WormholeAdminServer is a separate HTTP server, that allows managing wormhole using API

func NewWormholeAdminServer

func NewWormholeAdminServer(
	addr string,
	appList appLister,
	gatherer *ConsentGatherer,
) *WormholeAdminServer

NewWormholeAdminServer creates WormholeAdminServer instances

func (*WormholeAdminServer) Listen

func (apiServer *WormholeAdminServer) Listen() error

Listen starts the server

Jump to

Keyboard shortcuts

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