proto

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Backup_Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "SUCCESS",
		2: "FAILURE",
	}
	Backup_Status_value = map[string]int32{
		"UNKNOWN": 0,
		"SUCCESS": 1,
		"FAILURE": 2,
	}
)

Enum value maps for Backup_Status.

View Source
var (
	Restore_Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "SUCCESS",
		3: "FAILURE",
	}
	Restore_Status_value = map[string]int32{
		"UNKNOWN": 0,
		"SUCCESS": 1,
		"FAILURE": 3,
	}
)

Enum value maps for Restore_Status.

View Source
var (
	Link_Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "SUCCESS",
		3: "FAILURE",
	}
	Link_Status_value = map[string]int32{
		"UNKNOWN": 0,
		"SUCCESS": 1,
		"FAILURE": 3,
	}
)

Enum value maps for Link_Status.

View Source
var (
	Unlink_Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "SUCCESS",
		3: "FAILURE",
	}
	Unlink_Status_value = map[string]int32{
		"UNKNOWN": 0,
		"SUCCESS": 1,
		"FAILURE": 3,
	}
)

Enum value maps for Unlink_Status.

View Source
var (
	Diagnostic_Severity_name = map[int32]string{
		0: "INVALID",
		1: "ERROR",
		2: "WARNING",
	}
	Diagnostic_Severity_value = map[string]int32{
		"INVALID": 0,
		"ERROR":   1,
		"WARNING": 2,
	}
)

Enum value maps for Diagnostic_Severity.

View Source
var File_pkg_proto_csync_proto protoreflect.FileDescriptor
View Source
var Plugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Plugin",
	HandlerType: (*PluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Backup",
			Handler:    _Plugin_Backup_Handler,
		},
		{
			MethodName: "Restore",
			Handler:    _Plugin_Restore_Handler,
		},
		{
			MethodName: "Link",
			Handler:    _Plugin_Link_Handler,
		},
		{
			MethodName: "Unlink",
			Handler:    _Plugin_Unlink_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/proto/csync.proto",
}

Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPluginServer

func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)

Types

type Application

type Application struct {

	// / Name of the application.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// / Files is the list of files that belong to the application.
	Files []string `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

/ Application is a container for the files to backup / that belong to an application.

func (*Application) Descriptor deprecated

func (*Application) Descriptor() ([]byte, []int)

Deprecated: Use Application.ProtoReflect.Descriptor instead.

func (*Application) GetFiles

func (x *Application) GetFiles() []string

func (*Application) GetName

func (x *Application) GetName() string

func (*Application) ProtoMessage

func (*Application) ProtoMessage()

func (*Application) ProtoReflect

func (x *Application) ProtoReflect() protoreflect.Message

func (*Application) Reset

func (x *Application) Reset()

func (*Application) String

func (x *Application) String() string

type Backup

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

/ Backup ...

func (*Backup) Descriptor deprecated

func (*Backup) Descriptor() ([]byte, []int)

Deprecated: Use Backup.ProtoReflect.Descriptor instead.

func (*Backup) ProtoMessage

func (*Backup) ProtoMessage()

func (*Backup) ProtoReflect

func (x *Backup) ProtoReflect() protoreflect.Message

func (*Backup) Reset

func (x *Backup) Reset()

func (*Backup) String

func (x *Backup) String() string

type Backup_Request

type Backup_Request struct {
	Version string            `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Vars    map[string]string `` /* 149-byte string literal not displayed */
	Args    []string          `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	File    string            `protobuf:"bytes,4,opt,name=file,proto3" json:"file,omitempty"`
	App     *Application      `protobuf:"bytes,5,opt,name=app,proto3" json:"app,omitempty"`
	Dry     bool              `protobuf:"varint,10,opt,name=dry,proto3" json:"dry,omitempty"`
	Force   bool              `protobuf:"varint,11,opt,name=force,proto3" json:"force,omitempty"`
	Root    bool              `protobuf:"varint,12,opt,name=root,proto3" json:"root,omitempty"`
	// contains filtered or unexported fields
}

/ Request ...

func (*Backup_Request) Descriptor deprecated

func (*Backup_Request) Descriptor() ([]byte, []int)

Deprecated: Use Backup_Request.ProtoReflect.Descriptor instead.

func (*Backup_Request) GetApp

func (x *Backup_Request) GetApp() *Application

func (*Backup_Request) GetArgs

func (x *Backup_Request) GetArgs() []string

func (*Backup_Request) GetDry

func (x *Backup_Request) GetDry() bool

func (*Backup_Request) GetFile

func (x *Backup_Request) GetFile() string

func (*Backup_Request) GetForce

func (x *Backup_Request) GetForce() bool

func (*Backup_Request) GetRoot

func (x *Backup_Request) GetRoot() bool

func (*Backup_Request) GetVars

func (x *Backup_Request) GetVars() map[string]string

func (*Backup_Request) GetVersion

func (x *Backup_Request) GetVersion() string

func (*Backup_Request) ProtoMessage

func (*Backup_Request) ProtoMessage()

func (*Backup_Request) ProtoReflect

func (x *Backup_Request) ProtoReflect() protoreflect.Message

func (*Backup_Request) Reset

func (x *Backup_Request) Reset()

func (*Backup_Request) String

func (x *Backup_Request) String() string

type Backup_Response

type Backup_Response struct {
	Status     Backup_Status `protobuf:"varint,1,opt,name=status,proto3,enum=proto.Backup_Status" json:"status,omitempty"`
	Diagnostic []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostic,proto3" json:"diagnostic,omitempty"`
	// contains filtered or unexported fields
}

/ Response ...

func (*Backup_Response) Descriptor deprecated

func (*Backup_Response) Descriptor() ([]byte, []int)

Deprecated: Use Backup_Response.ProtoReflect.Descriptor instead.

func (*Backup_Response) GetDiagnostic

func (x *Backup_Response) GetDiagnostic() []*Diagnostic

func (*Backup_Response) GetStatus

func (x *Backup_Response) GetStatus() Backup_Status

func (*Backup_Response) ProtoMessage

func (*Backup_Response) ProtoMessage()

func (*Backup_Response) ProtoReflect

func (x *Backup_Response) ProtoReflect() protoreflect.Message

func (*Backup_Response) Reset

func (x *Backup_Response) Reset()

func (*Backup_Response) String

func (x *Backup_Response) String() string

type Backup_Status

type Backup_Status int32
const (
	Backup_UNKNOWN Backup_Status = 0
	Backup_SUCCESS Backup_Status = 1
	Backup_FAILURE Backup_Status = 2
)

func (Backup_Status) Descriptor

func (Backup_Status) Enum

func (x Backup_Status) Enum() *Backup_Status

func (Backup_Status) EnumDescriptor deprecated

func (Backup_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Backup_Status.Descriptor instead.

func (Backup_Status) Number

func (Backup_Status) String

func (x Backup_Status) String() string

func (Backup_Status) Type

type Diagnostic

type Diagnostic struct {
	Severity  Diagnostic_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=proto.Diagnostic_Severity" json:"severity,omitempty"`
	Summary   string              `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"`
	Detail    string              `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
	FilePaths []string            `protobuf:"bytes,4,rep,name=FilePaths,proto3" json:"FilePaths,omitempty"`
	// contains filtered or unexported fields
}

/ Diagnostic ...

func DiagnosticFromError

func DiagnosticFromError(err error) *Diagnostic

DiagnosticFromError ...

func (*Diagnostic) Descriptor deprecated

func (*Diagnostic) Descriptor() ([]byte, []int)

Deprecated: Use Diagnostic.ProtoReflect.Descriptor instead.

func (*Diagnostic) GetDetail

func (x *Diagnostic) GetDetail() string

func (*Diagnostic) GetFilePaths

func (x *Diagnostic) GetFilePaths() []string

func (*Diagnostic) GetSeverity

func (x *Diagnostic) GetSeverity() Diagnostic_Severity

func (*Diagnostic) GetSummary

func (x *Diagnostic) GetSummary() string

func (*Diagnostic) ProtoMessage

func (*Diagnostic) ProtoMessage()

func (*Diagnostic) ProtoReflect

func (x *Diagnostic) ProtoReflect() protoreflect.Message

func (*Diagnostic) Reset

func (x *Diagnostic) Reset()

func (*Diagnostic) String

func (x *Diagnostic) String() string

type Diagnostic_Severity

type Diagnostic_Severity int32
const (
	Diagnostic_INVALID Diagnostic_Severity = 0
	Diagnostic_ERROR   Diagnostic_Severity = 1
	Diagnostic_WARNING Diagnostic_Severity = 2
)

func (Diagnostic_Severity) Descriptor

func (Diagnostic_Severity) Enum

func (Diagnostic_Severity) EnumDescriptor deprecated

func (Diagnostic_Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Diagnostic_Severity.Descriptor instead.

func (Diagnostic_Severity) Number

func (Diagnostic_Severity) String

func (x Diagnostic_Severity) String() string

func (Diagnostic_Severity) Type

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

/ Link ...

func (*Link) Descriptor deprecated

func (*Link) Descriptor() ([]byte, []int)

Deprecated: Use Link.ProtoReflect.Descriptor instead.

func (*Link) ProtoMessage

func (*Link) ProtoMessage()

func (*Link) ProtoReflect

func (x *Link) ProtoReflect() protoreflect.Message

func (*Link) Reset

func (x *Link) Reset()

func (*Link) String

func (x *Link) String() string
type Link_Request struct {
	Version string            `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Vars    map[string]string `` /* 149-byte string literal not displayed */
	Args    []string          `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	File    string            `protobuf:"bytes,4,opt,name=file,proto3" json:"file,omitempty"`
	App     *Application      `protobuf:"bytes,5,opt,name=app,proto3" json:"app,omitempty"`
	Dry     bool              `protobuf:"varint,10,opt,name=dry,proto3" json:"dry,omitempty"`
	Force   bool              `protobuf:"varint,11,opt,name=force,proto3" json:"force,omitempty"`
	Root    bool              `protobuf:"varint,12,opt,name=root,proto3" json:"root,omitempty"`
	// contains filtered or unexported fields
}

/ Request ...

func (*Link_Request) Descriptor() ([]byte, []int)

Deprecated: Use Link_Request.ProtoReflect.Descriptor instead.

func (x *Link_Request) GetApp() *Application
func (x *Link_Request) GetArgs() []string
func (x *Link_Request) GetDry() bool
func (x *Link_Request) GetFile() string
func (x *Link_Request) GetForce() bool
func (x *Link_Request) GetRoot() bool
func (x *Link_Request) GetVars() map[string]string
func (x *Link_Request) GetVersion() string
func (*Link_Request) ProtoMessage()
func (x *Link_Request) ProtoReflect() protoreflect.Message
func (x *Link_Request) Reset()
func (x *Link_Request) String() string
type Link_Response struct {
	Status     Link_Status   `protobuf:"varint,1,opt,name=status,proto3,enum=proto.Link_Status" json:"status,omitempty"`
	Diagnostic []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostic,proto3" json:"diagnostic,omitempty"`
	// contains filtered or unexported fields
}

/ Response ...

func (*Link_Response) Descriptor() ([]byte, []int)

Deprecated: Use Link_Response.ProtoReflect.Descriptor instead.

func (x *Link_Response) GetDiagnostic() []*Diagnostic
func (x *Link_Response) GetStatus() Link_Status
func (*Link_Response) ProtoMessage()
func (x *Link_Response) ProtoReflect() protoreflect.Message
func (x *Link_Response) Reset()
func (x *Link_Response) String() string
type Link_Status int32

/ Status ...

const (
	Link_UNKNOWN Link_Status = 0
	Link_SUCCESS Link_Status = 1
	Link_FAILURE Link_Status = 3
)
func (x Link_Status) Enum() *Link_Status
func (Link_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Link_Status.Descriptor instead.

func (x Link_Status) Number() protoreflect.EnumNumber
func (x Link_Status) String() string

type PluginClient

type PluginClient interface {
	// / Backup ...
	Backup(ctx context.Context, in *Backup_Request, opts ...grpc.CallOption) (*Backup_Response, error)
	// / Restore ...
	Restore(ctx context.Context, in *Restore_Request, opts ...grpc.CallOption) (*Restore_Response, error)
	// / Link ....
	Link(ctx context.Context, in *Link_Request, opts ...grpc.CallOption) (*Link_Response, error)
	// / Unlink ...
	Unlink(ctx context.Context, in *Unlink_Request, opts ...grpc.CallOption) (*Unlink_Response, error)
}

PluginClient is the client API for Plugin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewPluginClient

func NewPluginClient(cc grpc.ClientConnInterface) PluginClient

type PluginServer

type PluginServer interface {
	// / Backup ...
	Backup(context.Context, *Backup_Request) (*Backup_Response, error)
	// / Restore ...
	Restore(context.Context, *Restore_Request) (*Restore_Response, error)
	// / Link ....
	Link(context.Context, *Link_Request) (*Link_Response, error)
	// / Unlink ...
	Unlink(context.Context, *Unlink_Request) (*Unlink_Response, error)
	// contains filtered or unexported methods
}

PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility

type Restore

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

/ Restore ...

func (*Restore) Descriptor deprecated

func (*Restore) Descriptor() ([]byte, []int)

Deprecated: Use Restore.ProtoReflect.Descriptor instead.

func (*Restore) ProtoMessage

func (*Restore) ProtoMessage()

func (*Restore) ProtoReflect

func (x *Restore) ProtoReflect() protoreflect.Message

func (*Restore) Reset

func (x *Restore) Reset()

func (*Restore) String

func (x *Restore) String() string

type Restore_Request

type Restore_Request struct {
	Version string            `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Vars    map[string]string `` /* 149-byte string literal not displayed */
	Args    []string          `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	File    string            `protobuf:"bytes,4,opt,name=file,proto3" json:"file,omitempty"`
	App     *Application      `protobuf:"bytes,5,opt,name=app,proto3" json:"app,omitempty"`
	Dry     bool              `protobuf:"varint,10,opt,name=dry,proto3" json:"dry,omitempty"`
	Force   bool              `protobuf:"varint,11,opt,name=force,proto3" json:"force,omitempty"`
	Root    bool              `protobuf:"varint,12,opt,name=root,proto3" json:"root,omitempty"`
	// contains filtered or unexported fields
}

/ Request ...

func (*Restore_Request) Descriptor deprecated

func (*Restore_Request) Descriptor() ([]byte, []int)

Deprecated: Use Restore_Request.ProtoReflect.Descriptor instead.

func (*Restore_Request) GetApp

func (x *Restore_Request) GetApp() *Application

func (*Restore_Request) GetArgs

func (x *Restore_Request) GetArgs() []string

func (*Restore_Request) GetDry

func (x *Restore_Request) GetDry() bool

func (*Restore_Request) GetFile

func (x *Restore_Request) GetFile() string

func (*Restore_Request) GetForce

func (x *Restore_Request) GetForce() bool

func (*Restore_Request) GetRoot

func (x *Restore_Request) GetRoot() bool

func (*Restore_Request) GetVars

func (x *Restore_Request) GetVars() map[string]string

func (*Restore_Request) GetVersion

func (x *Restore_Request) GetVersion() string

func (*Restore_Request) ProtoMessage

func (*Restore_Request) ProtoMessage()

func (*Restore_Request) ProtoReflect

func (x *Restore_Request) ProtoReflect() protoreflect.Message

func (*Restore_Request) Reset

func (x *Restore_Request) Reset()

func (*Restore_Request) String

func (x *Restore_Request) String() string

type Restore_Response

type Restore_Response struct {
	Status     Restore_Status `protobuf:"varint,1,opt,name=status,proto3,enum=proto.Restore_Status" json:"status,omitempty"`
	Diagnostic []*Diagnostic  `protobuf:"bytes,2,rep,name=diagnostic,proto3" json:"diagnostic,omitempty"`
	// contains filtered or unexported fields
}

/ Response ...

func (*Restore_Response) Descriptor deprecated

func (*Restore_Response) Descriptor() ([]byte, []int)

Deprecated: Use Restore_Response.ProtoReflect.Descriptor instead.

func (*Restore_Response) GetDiagnostic

func (x *Restore_Response) GetDiagnostic() []*Diagnostic

func (*Restore_Response) GetStatus

func (x *Restore_Response) GetStatus() Restore_Status

func (*Restore_Response) ProtoMessage

func (*Restore_Response) ProtoMessage()

func (*Restore_Response) ProtoReflect

func (x *Restore_Response) ProtoReflect() protoreflect.Message

func (*Restore_Response) Reset

func (x *Restore_Response) Reset()

func (*Restore_Response) String

func (x *Restore_Response) String() string

type Restore_Status

type Restore_Status int32

/ Status ...

const (
	Restore_UNKNOWN Restore_Status = 0
	Restore_SUCCESS Restore_Status = 1
	Restore_FAILURE Restore_Status = 3
)

func (Restore_Status) Descriptor

func (Restore_Status) Enum

func (x Restore_Status) Enum() *Restore_Status

func (Restore_Status) EnumDescriptor deprecated

func (Restore_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Restore_Status.Descriptor instead.

func (Restore_Status) Number

func (Restore_Status) String

func (x Restore_Status) String() string

func (Restore_Status) Type

type UnimplementedPluginServer

type UnimplementedPluginServer struct {
}

UnimplementedPluginServer must be embedded to have forward compatible implementations.

func (UnimplementedPluginServer) Backup

func (UnimplementedPluginServer) Restore

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

/ Unlink ...

func (*Unlink) Descriptor deprecated

func (*Unlink) Descriptor() ([]byte, []int)

Deprecated: Use Unlink.ProtoReflect.Descriptor instead.

func (*Unlink) ProtoMessage

func (*Unlink) ProtoMessage()

func (*Unlink) ProtoReflect

func (x *Unlink) ProtoReflect() protoreflect.Message

func (*Unlink) Reset

func (x *Unlink) Reset()

func (*Unlink) String

func (x *Unlink) String() string
type Unlink_Request struct {
	Version string            `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Vars    map[string]string `` /* 149-byte string literal not displayed */
	Args    []string          `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
	File    string            `protobuf:"bytes,4,opt,name=file,proto3" json:"file,omitempty"`
	App     *Application      `protobuf:"bytes,5,opt,name=app,proto3" json:"app,omitempty"`
	Dry     bool              `protobuf:"varint,10,opt,name=dry,proto3" json:"dry,omitempty"`
	Force   bool              `protobuf:"varint,11,opt,name=force,proto3" json:"force,omitempty"`
	Root    bool              `protobuf:"varint,12,opt,name=root,proto3" json:"root,omitempty"`
	// contains filtered or unexported fields
}

/ Request ...

func (*Unlink_Request) Descriptor() ([]byte, []int)

Deprecated: Use Unlink_Request.ProtoReflect.Descriptor instead.

func (x *Unlink_Request) GetApp() *Application
func (x *Unlink_Request) GetArgs() []string
func (x *Unlink_Request) GetDry() bool
func (x *Unlink_Request) GetFile() string
func (x *Unlink_Request) GetForce() bool
func (x *Unlink_Request) GetRoot() bool
func (x *Unlink_Request) GetVars() map[string]string
func (x *Unlink_Request) GetVersion() string
func (*Unlink_Request) ProtoMessage()
func (x *Unlink_Request) ProtoReflect() protoreflect.Message
func (x *Unlink_Request) Reset()
func (x *Unlink_Request) String() string
type Unlink_Response struct {
	Status     Unlink_Status `protobuf:"varint,1,opt,name=status,proto3,enum=proto.Unlink_Status" json:"status,omitempty"`
	Diagnostic []*Diagnostic `protobuf:"bytes,2,rep,name=diagnostic,proto3" json:"diagnostic,omitempty"`
	// contains filtered or unexported fields
}

/ Response ...

func (*Unlink_Response) Descriptor() ([]byte, []int)

Deprecated: Use Unlink_Response.ProtoReflect.Descriptor instead.

func (x *Unlink_Response) GetDiagnostic() []*Diagnostic
func (x *Unlink_Response) GetStatus() Unlink_Status
func (*Unlink_Response) ProtoMessage()
func (x *Unlink_Response) ProtoReflect() protoreflect.Message
func (x *Unlink_Response) Reset()
func (x *Unlink_Response) String() string
type Unlink_Status int32

/ Status ...

const (
	Unlink_UNKNOWN Unlink_Status = 0
	Unlink_SUCCESS Unlink_Status = 1
	Unlink_FAILURE Unlink_Status = 3
)
func (x Unlink_Status) Enum() *Unlink_Status
func (Unlink_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Unlink_Status.Descriptor instead.

func (x Unlink_Status) String() string

type UnsafePluginServer

type UnsafePluginServer interface {
	// contains filtered or unexported methods
}

UnsafePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServer will result in compilation errors.

Jump to

Keyboard shortcuts

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