api

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator added in v0.8.0

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

func NewAuthenticator added in v0.8.0

func NewAuthenticator(users []*v1.User) *Authenticator

func (*Authenticator) Authenticate added in v0.8.0

func (a *Authenticator) Authenticate(username, password string) (*User, bool)

type Server

type Server struct {
	v1connect.UnimplementedBackrestHandler
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config config.ConfigStore, orchestrator *orchestrator.Orchestrator, oplog *oplog.OpLog) *Server

func (*Server) AddRepo

func (s *Server) AddRepo(ctx context.Context, req *connect.Request[v1.Repo]) (*connect.Response[v1.Config], error)

AddRepo implements POST /v1/config/repo, it includes validation that the repo can be initialized.

func (*Server) Backup

func (*Server) Cancel

func (*Server) ClearHistory

func (*Server) Forget

func (*Server) GetConfig

func (s *Server) GetConfig(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[v1.Config], error)

GetConfig implements GET /v1/config

func (*Server) GetOperationEvents

func (s *Server) GetOperationEvents(ctx context.Context, req *connect.Request[emptypb.Empty], resp *connect.ServerStream[v1.OperationEvent]) error

GetOperationEvents implements GET /v1/events/operations

func (*Server) GetOperations

func (*Server) IndexSnapshots added in v0.9.0

func (s *Server) IndexSnapshots(ctx context.Context, req *connect.Request[types.StringValue]) (*connect.Response[emptypb.Empty], error)

func (*Server) ListSnapshots

ListSnapshots implements POST /v1/snapshots

func (*Server) PathAutocomplete

func (s *Server) PathAutocomplete(ctx context.Context, path *connect.Request[types.StringValue]) (*connect.Response[types.StringList], error)

func (*Server) Prune

func (*Server) SetConfig

func (s *Server) SetConfig(ctx context.Context, req *connect.Request[v1.Config]) (*connect.Response[v1.Config], error)

SetConfig implements POST /v1/config

func (*Server) Unlock

type User added in v0.8.0

type User v1.User

func (*User) CheckPassword added in v0.8.0

func (u *User) CheckPassword(password string) bool

Jump to

Keyboard shortcuts

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