manage

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Authenticate(ctx context.Context, username string, password string) (*user.User, error)
	CreateUser(ctx context.Context, options *user.CreateOptions) (*user.User, error)
	UpdateUser(ctx context.Context, userId string, options *user.UpdateOptions, fieldMask *user.UpdateFieldMask) (*user.User, error)
	DeleteUser(ctx context.Context, userId string) (*user.User, error)
	CreateServer(ctx context.Context, options *server.CreateOptions, userId string) (*server.Server, error)
	UpdateServer(ctx context.Context, serverId string, options *server.UpdateOptions, fieldMask *server.UpdateFieldMask, userId string) (*server.Server, error)
	DeleteServer(ctx context.Context, serverId string, userId string) (*server.Server, error)
	StartServer(ctx context.Context, serverId string, userId string) (*server.Server, error)
	StopServer(ctx context.Context, serverId string, userId string) (*server.Server, error)
	ImportForeignServer(ctx context.Context, name string, userId string) (*server.Server, error)
	CreatePeer(ctx context.Context, serverId string, options *peer.CreateOptions, userId string) (*peer.Peer, error)
	UpdatePeer(ctx context.Context, peerId string, options *peer.UpdateOptions, fieldMask *peer.UpdateFieldMask, userId string) (*peer.Peer, error)
	DeletePeer(ctx context.Context, peerId string, userId string) (*peer.Peer, error)
	PeerStats(ctx context.Context, name string, peerPublicKey string) (*backend.PeerStats, error)
	ForeignServers(ctx context.Context) ([]*backend.ForeignServer, error)
	Close()
}

func NewService

func NewService(
	transactionScoper dbx.TransactionScoper,
	userService user.Service,
	serverService server.Service,
	peerService peer.Service,
	wireguardService wireguard.Service,
	automaticStatsUpdateInterval time.Duration,
	automaticStatsUpdateOnlyWithSubscribers bool,
) Service

Jump to

Keyboard shortcuts

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