Documentation ¶
Index ¶
- Variables
- func RegisterBackupServiceServer(s grpc.ServiceRegistrar, srv BackupServiceServer)
- type BackupFile
- func (*BackupFile) Descriptor() ([]byte, []int)deprecated
- func (x *BackupFile) GetDateSeen() int32
- func (x *BackupFile) GetDirectoryHash() int32
- func (x *BackupFile) GetFilenameHash() int32
- func (x *BackupFile) GetState() BackupFile_BackupState
- func (*BackupFile) ProtoMessage()
- func (x *BackupFile) ProtoReflect() protoreflect.Message
- func (x *BackupFile) Reset()
- func (x *BackupFile) String() string
- type BackupFile_BackupState
- func (BackupFile_BackupState) Descriptor() protoreflect.EnumDescriptor
- func (x BackupFile_BackupState) Enum() *BackupFile_BackupState
- func (BackupFile_BackupState) EnumDescriptor() ([]byte, []int)deprecated
- func (x BackupFile_BackupState) Number() protoreflect.EnumNumber
- func (x BackupFile_BackupState) String() string
- func (BackupFile_BackupState) Type() protoreflect.EnumType
- type BackupServiceClient
- type BackupServiceServer
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetFiles() []*BackupFile
- func (x *Config) GetLastBackup() int64
- func (x *Config) GetUsesHashes() bool
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type RunBackupRequest
- type RunBackupResponse
- type Stat
- func (*Stat) Descriptor() ([]byte, []int)deprecated
- func (x *Stat) GetCount() int32
- func (x *Stat) GetExample() *BackupFile
- func (x *Stat) GetState() BackupFile_BackupState
- func (*Stat) ProtoMessage()
- func (x *Stat) ProtoReflect() protoreflect.Message
- func (x *Stat) Reset()
- func (x *Stat) String() string
- type StatsRequest
- type StatsResponse
- type Token
- type TokenRequest
- type TokenResponse
- type UnimplementedBackupServiceServer
- func (UnimplementedBackupServiceServer) GetStats(context.Context, *StatsRequest) (*StatsResponse, error)
- func (UnimplementedBackupServiceServer) RunBackup(context.Context, *RunBackupRequest) (*RunBackupResponse, error)
- func (UnimplementedBackupServiceServer) SaveToken(context.Context, *TokenRequest) (*TokenResponse, error)
- type UnsafeBackupServiceServer
Constants ¶
This section is empty.
Variables ¶
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.
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)
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) Descriptor() protoreflect.EnumDescriptor
func (BackupFile_BackupState) Enum ¶
func (x BackupFile_BackupState) Enum() *BackupFile_BackupState
func (BackupFile_BackupState) EnumDescriptor
deprecated
func (BackupFile_BackupState) EnumDescriptor() ([]byte, []int)
Deprecated: Use BackupFile_BackupState.Descriptor instead.
func (BackupFile_BackupState) Number ¶
func (x BackupFile_BackupState) Number() protoreflect.EnumNumber
func (BackupFile_BackupState) String ¶
func (x BackupFile_BackupState) String() string
func (BackupFile_BackupState) Type ¶
func (BackupFile_BackupState) Type() protoreflect.EnumType
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.
func NewBackupServiceClient ¶
func NewBackupServiceClient(cc grpc.ClientConnInterface) BackupServiceClient
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) GetFiles ¶
func (x *Config) GetFiles() []*BackupFile
func (*Config) GetLastBackup ¶
func (*Config) GetUsesHashes ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
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) 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
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) GetJsonToken ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
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) GetStats(context.Context, *StatsRequest) (*StatsResponse, error)
func (UnimplementedBackupServiceServer) RunBackup ¶
func (UnimplementedBackupServiceServer) RunBackup(context.Context, *RunBackupRequest) (*RunBackupResponse, error)
func (UnimplementedBackupServiceServer) SaveToken ¶
func (UnimplementedBackupServiceServer) SaveToken(context.Context, *TokenRequest) (*TokenResponse, error)
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.