proto

package
v0.0.0-...-a74c514 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BackupFile_BackupState_name = map[int32]string{
		0: "UNKNOWN",
		1: "NOT_BACKED_UP",
		2: "BACKED_UP",
		3: "MISSING",
	}
	BackupFile_BackupState_value = map[string]int32{
		"UNKNOWN":       0,
		"NOT_BACKED_UP": 1,
		"BACKED_UP":     2,
		"MISSING":       3,
	}
)

Enum value maps for BackupFile_BackupState.

View Source
var BackupService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "backup.BackupService",
	HandlerType: (*BackupServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SaveToken",
			Handler:    _BackupService_SaveToken_Handler,
		},
		{
			MethodName: "GetStats",
			Handler:    _BackupService_GetStats_Handler,
		},
		{
			MethodName: "RunBackup",
			Handler:    _BackupService_RunBackup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "backup.proto",
}

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

View Source
var File_backup_proto protoreflect.FileDescriptor

Functions

func RegisterBackupServiceServer

func RegisterBackupServiceServer(s grpc.ServiceRegistrar, srv BackupServiceServer)

Types

type BackupFile

type BackupFile struct {
	DateSeen      int32                  `protobuf:"varint,1,opt,name=date_seen,json=dateSeen,proto3" json:"date_seen,omitempty"`
	State         BackupFile_BackupState `protobuf:"varint,4,opt,name=state,proto3,enum=backup.BackupFile_BackupState" json:"state,omitempty"`
	DirectoryHash int32                  `protobuf:"zigzag32,2,opt,name=directory_hash,json=directoryHash,proto3" json:"directory_hash,omitempty"`
	FilenameHash  int32                  `protobuf:"zigzag32,3,opt,name=filename_hash,json=filenameHash,proto3" json:"filename_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*BackupFile) Descriptor deprecated

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

Deprecated: Use BackupFile.ProtoReflect.Descriptor instead.

func (*BackupFile) GetDateSeen

func (x *BackupFile) GetDateSeen() int32

func (*BackupFile) GetDirectoryHash

func (x *BackupFile) GetDirectoryHash() int32

func (*BackupFile) GetFilenameHash

func (x *BackupFile) GetFilenameHash() int32

func (*BackupFile) GetState

func (x *BackupFile) GetState() BackupFile_BackupState

func (*BackupFile) ProtoMessage

func (*BackupFile) ProtoMessage()

func (*BackupFile) ProtoReflect

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

func (*BackupFile) Reset

func (x *BackupFile) Reset()

func (*BackupFile) String

func (x *BackupFile) String() string

type BackupFile_BackupState

type BackupFile_BackupState int32
const (
	BackupFile_UNKNOWN       BackupFile_BackupState = 0
	BackupFile_NOT_BACKED_UP BackupFile_BackupState = 1
	BackupFile_BACKED_UP     BackupFile_BackupState = 2
	BackupFile_MISSING       BackupFile_BackupState = 3
)

func (BackupFile_BackupState) Descriptor

func (BackupFile_BackupState) Enum

func (BackupFile_BackupState) EnumDescriptor deprecated

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

Deprecated: Use BackupFile_BackupState.Descriptor instead.

func (BackupFile_BackupState) Number

func (BackupFile_BackupState) String

func (x BackupFile_BackupState) String() string

func (BackupFile_BackupState) Type

type BackupServiceClient

type BackupServiceClient interface {
	SaveToken(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error)
	GetStats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsResponse, error)
	RunBackup(ctx context.Context, in *RunBackupRequest, opts ...grpc.CallOption) (*RunBackupResponse, error)
}

BackupServiceClient is the client API for BackupService 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.

type BackupServiceServer

type BackupServiceServer interface {
	SaveToken(context.Context, *TokenRequest) (*TokenResponse, error)
	GetStats(context.Context, *StatsRequest) (*StatsResponse, error)
	RunBackup(context.Context, *RunBackupRequest) (*RunBackupResponse, error)
}

BackupServiceServer is the server API for BackupService service. All implementations should embed UnimplementedBackupServiceServer for forward compatibility

type Config

type Config struct {
	LastBackup int64         `protobuf:"varint,2,opt,name=last_backup,json=lastBackup,proto3" json:"last_backup,omitempty"`
	Files      []*BackupFile `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"`
	UsesHashes bool          `protobuf:"varint,4,opt,name=uses_hashes,json=usesHashes,proto3" json:"uses_hashes,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetFiles

func (x *Config) GetFiles() []*BackupFile

func (*Config) GetLastBackup

func (x *Config) GetLastBackup() int64

func (*Config) GetUsesHashes

func (x *Config) GetUsesHashes() bool

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type RunBackupRequest

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

func (*RunBackupRequest) Descriptor deprecated

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

Deprecated: Use RunBackupRequest.ProtoReflect.Descriptor instead.

func (*RunBackupRequest) ProtoMessage

func (*RunBackupRequest) ProtoMessage()

func (*RunBackupRequest) ProtoReflect

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

func (*RunBackupRequest) Reset

func (x *RunBackupRequest) Reset()

func (*RunBackupRequest) String

func (x *RunBackupRequest) String() string

type RunBackupResponse

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

func (*RunBackupResponse) Descriptor deprecated

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

Deprecated: Use RunBackupResponse.ProtoReflect.Descriptor instead.

func (*RunBackupResponse) ProtoMessage

func (*RunBackupResponse) ProtoMessage()

func (*RunBackupResponse) ProtoReflect

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

func (*RunBackupResponse) Reset

func (x *RunBackupResponse) Reset()

func (*RunBackupResponse) String

func (x *RunBackupResponse) String() string

type Stat

type Stat struct {
	State   BackupFile_BackupState `protobuf:"varint,1,opt,name=state,proto3,enum=backup.BackupFile_BackupState" json:"state,omitempty"`
	Count   int32                  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	Example *BackupFile            `protobuf:"bytes,3,opt,name=example,proto3" json:"example,omitempty"`
	// contains filtered or unexported fields
}

func (*Stat) Descriptor deprecated

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

Deprecated: Use Stat.ProtoReflect.Descriptor instead.

func (*Stat) GetCount

func (x *Stat) GetCount() int32

func (*Stat) GetExample

func (x *Stat) GetExample() *BackupFile

func (*Stat) GetState

func (x *Stat) GetState() BackupFile_BackupState

func (*Stat) ProtoMessage

func (*Stat) ProtoMessage()

func (*Stat) ProtoReflect

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

func (*Stat) Reset

func (x *Stat) Reset()

func (*Stat) String

func (x *Stat) String() string

type StatsRequest

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

func (*StatsRequest) Descriptor deprecated

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

Deprecated: Use StatsRequest.ProtoReflect.Descriptor instead.

func (*StatsRequest) ProtoMessage

func (*StatsRequest) ProtoMessage()

func (*StatsRequest) ProtoReflect

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

func (*StatsRequest) Reset

func (x *StatsRequest) Reset()

func (*StatsRequest) String

func (x *StatsRequest) String() string

type StatsResponse

type StatsResponse struct {
	Stats []*Stat `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"`
	// contains filtered or unexported fields
}

func (*StatsResponse) Descriptor deprecated

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

Deprecated: Use StatsResponse.ProtoReflect.Descriptor instead.

func (*StatsResponse) GetStats

func (x *StatsResponse) GetStats() []*Stat

func (*StatsResponse) ProtoMessage

func (*StatsResponse) ProtoMessage()

func (*StatsResponse) ProtoReflect

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

func (*StatsResponse) Reset

func (x *StatsResponse) Reset()

func (*StatsResponse) String

func (x *StatsResponse) String() string

type Token

type Token struct {
	JsonToken []byte `protobuf:"bytes,1,opt,name=json_token,json=jsonToken,proto3" json:"json_token,omitempty"`
	// contains filtered or unexported fields
}

func (*Token) Descriptor deprecated

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

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetJsonToken

func (x *Token) GetJsonToken() []byte

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

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

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type TokenRequest

type TokenRequest struct {
	Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenRequest) Descriptor deprecated

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

Deprecated: Use TokenRequest.ProtoReflect.Descriptor instead.

func (*TokenRequest) GetToken

func (x *TokenRequest) GetToken() *Token

func (*TokenRequest) ProtoMessage

func (*TokenRequest) ProtoMessage()

func (*TokenRequest) ProtoReflect

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

func (*TokenRequest) Reset

func (x *TokenRequest) Reset()

func (*TokenRequest) String

func (x *TokenRequest) String() string

type TokenResponse

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

func (*TokenResponse) Descriptor deprecated

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

Deprecated: Use TokenResponse.ProtoReflect.Descriptor instead.

func (*TokenResponse) ProtoMessage

func (*TokenResponse) ProtoMessage()

func (*TokenResponse) ProtoReflect

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

func (*TokenResponse) Reset

func (x *TokenResponse) Reset()

func (*TokenResponse) String

func (x *TokenResponse) String() string

type UnimplementedBackupServiceServer

type UnimplementedBackupServiceServer struct {
}

UnimplementedBackupServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedBackupServiceServer) GetStats

func (UnimplementedBackupServiceServer) RunBackup

func (UnimplementedBackupServiceServer) SaveToken

type UnsafeBackupServiceServer

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

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

Jump to

Keyboard shortcuts

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