reset

package
v0.0.0-...-557d8e2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client handles requesting a Factory Reset.

func NewClient

func NewClient(c *grpc.ClientConn) *Client

NewClient initializes a FactoryReset Client.

func (*Client) ResetTarget

func (c *Client) ResetTarget(ctx context.Context, zeroFill, rollbackOS bool) *ResetError

ResetTarget invokes gRPC start service on the server.

type Notifier

type Notifier func()

Notifier for reset callback.

type ResetError

type ResetError struct {
	Msgs []string
}

ResetError allows the return of multiple error messages concatenated.

func CheckResponse

func CheckResponse(res *pb.StartResponse) *ResetError

CheckResponse checks for errors.

func (*ResetError) Error

func (re *ResetError) Error() string

Error concatenates a multi-line error message.

type Server

type Server struct {
	pb.FactoryResetServer
	*Settings
	// contains filtered or unexported fields
}

Server for factory_reset service.

func NewServer

func NewServer(settings *Settings, notifier Notifier) *Server

NewServer generates a new factory reset server.

func (*Server) Register

func (s *Server) Register(g *grpc.Server)

Register registers the server into the gRPC server provided.

func (*Server) Start

func (s *Server) Start(ctx context.Context, req *pb.StartRequest) (*pb.StartResponse, error)

Start rpc will start the factory reset process.

type Settings

type Settings struct {
	ZeroFillUnsupported  bool
	FactoryOSUnsupported bool
}

Settings for configurable options in Server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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