Versions in this module Expand all Collapse all v1 v1.0.6 Jan 24, 2026 v1.0.5 Jan 20, 2026 v1.0.4 Jan 14, 2026 v1.0.3 Dec 24, 2025 v1.0.2 Dec 23, 2025 v1.0.1 Dec 14, 2025 v1.0.0 Dec 11, 2025 Changes in this version + const DbService_GetAllHandlers_FullMethodName + const DbService_GetBatchedHandlers_FullMethodName + const DbService_GetHandler_FullMethodName + const DbService_GetHandlersByGroup_FullMethodName + const DbService_UpdateHandler_FullMethodName + var DbService_ServiceDesc = grpc.ServiceDesc + var File_protos_db_db_proto protoreflect.FileDescriptor + func RegisterDbServiceServer(s grpc.ServiceRegistrar, srv DbServiceServer) + type Database struct + func (d *Database) Close() error + func (d *Database) GetAllHandlers() ([]*OutboundHandler, error) + func (d *Database) GetBatchedHandlers(batchSize int, offset int) ([]*OutboundHandler, error) + func (d *Database) GetHandler(id int) *OutboundHandler + func (d *Database) GetHandlerByTag(tag string) *OutboundHandler + func (d *Database) GetHandlersByGroup(group string) ([]*OutboundHandler, error) + func (d *Database) GetHighestSpeedHandler() *OutboundHandler + func (d *Database) UpdateHandler(id int, m map[string]interface{}) error + type Db struct + func NewDb(secret string, serverPort uint16) (*Db, error) + func (a *Db) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) + func (a *Db) RequireTransportSecurity() bool + func (d *Db) Close() error + func (d *Db) GetAllHandlers() ([]*OutboundHandler, error) + func (d *Db) GetBatchedHandlers(batchSize int, offset int) ([]*OutboundHandler, error) + func (d *Db) GetHandler(id int) *OutboundHandler + func (d *Db) GetHandlersByGroup(group string) ([]*OutboundHandler, error) + func (d *Db) UpdateHandler(id int, m map[string]interface{}) error + type DbHandlers struct + Handlers []*DbOutboundHandler + func (*DbHandlers) Descriptor() ([]byte, []int) + func (*DbHandlers) ProtoMessage() + func (x *DbHandlers) GetHandlers() []*DbOutboundHandler + func (x *DbHandlers) ProtoReflect() protoreflect.Message + func (x *DbHandlers) Reset() + func (x *DbHandlers) String() string + type DbOutboundHandler struct + Config []byte + Id int64 + Ok int32 + Ping int32 + PingTestTime int32 + Selected bool + Speed float32 + SpeedTestTime int32 + SubId int64 + Support6 int32 + Support6TestTime int32 + Tag string + func (*DbOutboundHandler) Descriptor() ([]byte, []int) + func (*DbOutboundHandler) ProtoMessage() + func (d *DbOutboundHandler) ToOutboundHandler() *OutboundHandler + func (x *DbOutboundHandler) GetConfig() []byte + func (x *DbOutboundHandler) GetId() int64 + func (x *DbOutboundHandler) GetOk() int32 + func (x *DbOutboundHandler) GetPing() int32 + func (x *DbOutboundHandler) GetPingTestTime() int32 + func (x *DbOutboundHandler) GetSelected() bool + func (x *DbOutboundHandler) GetSpeed() float32 + func (x *DbOutboundHandler) GetSpeedTestTime() int32 + func (x *DbOutboundHandler) GetSubId() int64 + func (x *DbOutboundHandler) GetSupport6() int32 + func (x *DbOutboundHandler) GetSupport6TestTime() int32 + func (x *DbOutboundHandler) GetTag() string + func (x *DbOutboundHandler) ProtoReflect() protoreflect.Message + func (x *DbOutboundHandler) Reset() + func (x *DbOutboundHandler) String() string + type DbServiceClient interface + GetAllHandlers func(ctx context.Context, in *GetAllHandlersRequest, opts ...grpc.CallOption) (*DbHandlers, error) + GetBatchedHandlers func(ctx context.Context, in *GetBatchedHandlersRequest, opts ...grpc.CallOption) (*DbHandlers, error) + GetHandler func(ctx context.Context, in *GetHandlerRequest, opts ...grpc.CallOption) (*DbOutboundHandler, error) + GetHandlersByGroup func(ctx context.Context, in *GetHandlersByGroupRequest, opts ...grpc.CallOption) (*DbHandlers, error) + UpdateHandler func(ctx context.Context, in *UpdateHandlerRequest, opts ...grpc.CallOption) (*Receipt, error) + func NewDbServiceClient(cc grpc.ClientConnInterface) DbServiceClient + type DbServiceServer interface + GetAllHandlers func(context.Context, *GetAllHandlersRequest) (*DbHandlers, error) + GetBatchedHandlers func(context.Context, *GetBatchedHandlersRequest) (*DbHandlers, error) + GetHandler func(context.Context, *GetHandlerRequest) (*DbOutboundHandler, error) + GetHandlersByGroup func(context.Context, *GetHandlersByGroupRequest) (*DbHandlers, error) + UpdateHandler func(context.Context, *UpdateHandlerRequest) (*Receipt, error) + type GetAllHandlersRequest struct + func (*GetAllHandlersRequest) Descriptor() ([]byte, []int) + func (*GetAllHandlersRequest) ProtoMessage() + func (x *GetAllHandlersRequest) ProtoReflect() protoreflect.Message + func (x *GetAllHandlersRequest) Reset() + func (x *GetAllHandlersRequest) String() string + type GetBatchedHandlersRequest struct + BatchSize uint32 + Offset uint32 + func (*GetBatchedHandlersRequest) Descriptor() ([]byte, []int) + func (*GetBatchedHandlersRequest) ProtoMessage() + func (x *GetBatchedHandlersRequest) GetBatchSize() uint32 + func (x *GetBatchedHandlersRequest) GetOffset() uint32 + func (x *GetBatchedHandlersRequest) ProtoReflect() protoreflect.Message + func (x *GetBatchedHandlersRequest) Reset() + func (x *GetBatchedHandlersRequest) String() string + type GetHandlerRequest struct + Id int64 + func (*GetHandlerRequest) Descriptor() ([]byte, []int) + func (*GetHandlerRequest) ProtoMessage() + func (x *GetHandlerRequest) GetId() int64 + func (x *GetHandlerRequest) ProtoReflect() protoreflect.Message + func (x *GetHandlerRequest) Reset() + func (x *GetHandlerRequest) String() string + type GetHandlersByGroupRequest struct + Group string + func (*GetHandlersByGroupRequest) Descriptor() ([]byte, []int) + func (*GetHandlersByGroupRequest) ProtoMessage() + func (x *GetHandlersByGroupRequest) GetGroup() string + func (x *GetHandlersByGroupRequest) ProtoReflect() protoreflect.Message + func (x *GetHandlersByGroupRequest) Reset() + func (x *GetHandlersByGroupRequest) String() string + type OutboundHandler struct + Config []byte + CountryCode string + ID int + Ok int + Ping int + PingTestTime int + Selected bool + ServerIp string + Sni string + Speed float64 + SpeedTestTime int + SubId *int + Support6 int + Support6TestTime int + func (h *OutboundHandler) GetPing() int + func (h *OutboundHandler) GetSpeed() float64 + func (h *OutboundHandler) GetSupport6() int + func (h *OutboundHandler) GetTag() string + func (h *OutboundHandler) IsPingDataOld() bool + func (h *OutboundHandler) IsSpeedDataOld() bool + func (h *OutboundHandler) IsSupport6DataOld() bool + func (h *OutboundHandler) ToConfig() *configs.HandlerConfig + type OutboundHandlerGroup struct + Name string + type OutboundHandlerGroupRelation struct + GroupName string + HandlerId int + type Pref struct + ID int + SubscriptionLastUpdate int + type Receipt struct + func (*Receipt) Descriptor() ([]byte, []int) + func (*Receipt) ProtoMessage() + func (x *Receipt) ProtoReflect() protoreflect.Message + func (x *Receipt) Reset() + func (x *Receipt) String() string + type Subscription struct + Description string + EndTime int + ID int + LastSuccessUpdate int + LastUpdate int + Link string + Name string + RemainingData float64 + Website string + type UnimplementedDbServiceServer struct + func (UnimplementedDbServiceServer) GetAllHandlers(context.Context, *GetAllHandlersRequest) (*DbHandlers, error) + func (UnimplementedDbServiceServer) GetBatchedHandlers(context.Context, *GetBatchedHandlersRequest) (*DbHandlers, error) + func (UnimplementedDbServiceServer) GetHandler(context.Context, *GetHandlerRequest) (*DbOutboundHandler, error) + func (UnimplementedDbServiceServer) GetHandlersByGroup(context.Context, *GetHandlersByGroupRequest) (*DbHandlers, error) + func (UnimplementedDbServiceServer) UpdateHandler(context.Context, *UpdateHandlerRequest) (*Receipt, error) + type UnsafeDbServiceServer interface + type UpdateHandlerRequest struct + Id int64 + Ok *int32 + Ping *int32 + PingTestTime *int32 + Speed *float32 + SpeedTestTime *int32 + Support6 *int32 + Support6TestTime *int32 + func (*UpdateHandlerRequest) Descriptor() ([]byte, []int) + func (*UpdateHandlerRequest) ProtoMessage() + func (x *UpdateHandlerRequest) GetId() int64 + func (x *UpdateHandlerRequest) GetOk() int32 + func (x *UpdateHandlerRequest) GetPing() int32 + func (x *UpdateHandlerRequest) GetPingTestTime() int32 + func (x *UpdateHandlerRequest) GetSpeed() float32 + func (x *UpdateHandlerRequest) GetSpeedTestTime() int32 + func (x *UpdateHandlerRequest) GetSupport6() int32 + func (x *UpdateHandlerRequest) GetSupport6TestTime() int32 + func (x *UpdateHandlerRequest) ProtoReflect() protoreflect.Message + func (x *UpdateHandlerRequest) Reset() + func (x *UpdateHandlerRequest) String() string