stats

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatsService_GetStats_FullMethodName = "/services.stats.StatsService/GetStats"
)

Variables

View Source
var File_services_stats_stats_proto protoreflect.FileDescriptor
View Source
var StatsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "services.stats.StatsService",
	HandlerType: (*StatsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStats",
			Handler:    _StatsService_GetStats_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "services/stats/stats.proto",
}

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

Functions

func RegisterStatsServiceServer

func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer)

Types

type GetStatsRequest

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

func (*GetStatsRequest) Descriptor deprecated

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

Deprecated: Use GetStatsRequest.ProtoReflect.Descriptor instead.

func (*GetStatsRequest) ProtoMessage

func (*GetStatsRequest) ProtoMessage()

func (*GetStatsRequest) ProtoReflect

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

func (*GetStatsRequest) Reset

func (x *GetStatsRequest) Reset()

func (*GetStatsRequest) Sanitize added in v0.9.4

func (m *GetStatsRequest) Sanitize() error

func (*GetStatsRequest) String

func (x *GetStatsRequest) String() string

func (*GetStatsRequest) Validate

func (m *GetStatsRequest) Validate() error

Validate checks the field values on GetStatsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetStatsRequest) ValidateAll

func (m *GetStatsRequest) ValidateAll() error

ValidateAll checks the field values on GetStatsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetStatsRequestMultiError, or nil if none found.

type GetStatsRequestMultiError

type GetStatsRequestMultiError []error

GetStatsRequestMultiError is an error wrapping multiple validation errors returned by GetStatsRequest.ValidateAll() if the designated constraints aren't met.

func (GetStatsRequestMultiError) AllErrors

func (m GetStatsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetStatsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetStatsRequestValidationError

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

GetStatsRequestValidationError is the validation error returned by GetStatsRequest.Validate if the designated constraints aren't met.

func (GetStatsRequestValidationError) Cause

Cause function returns cause value.

func (GetStatsRequestValidationError) Error

Error satisfies the builtin error interface

func (GetStatsRequestValidationError) ErrorName

func (e GetStatsRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetStatsRequestValidationError) Field

Field function returns field value.

func (GetStatsRequestValidationError) Key

Key function returns key value.

func (GetStatsRequestValidationError) Reason

Reason function returns reason value.

type GetStatsResponse

type GetStatsResponse struct {
	Stats map[string]*stats.Stat `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetStatsResponse) Descriptor deprecated

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

Deprecated: Use GetStatsResponse.ProtoReflect.Descriptor instead.

func (*GetStatsResponse) GetStats

func (x *GetStatsResponse) GetStats() map[string]*stats.Stat

func (*GetStatsResponse) ProtoMessage

func (*GetStatsResponse) ProtoMessage()

func (*GetStatsResponse) ProtoReflect

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

func (*GetStatsResponse) Reset

func (x *GetStatsResponse) Reset()

func (*GetStatsResponse) Sanitize added in v0.9.4

func (m *GetStatsResponse) Sanitize() error

func (*GetStatsResponse) String

func (x *GetStatsResponse) String() string

func (*GetStatsResponse) Validate

func (m *GetStatsResponse) Validate() error

Validate checks the field values on GetStatsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetStatsResponse) ValidateAll

func (m *GetStatsResponse) ValidateAll() error

ValidateAll checks the field values on GetStatsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetStatsResponseMultiError, or nil if none found.

type GetStatsResponseMultiError

type GetStatsResponseMultiError []error

GetStatsResponseMultiError is an error wrapping multiple validation errors returned by GetStatsResponse.ValidateAll() if the designated constraints aren't met.

func (GetStatsResponseMultiError) AllErrors

func (m GetStatsResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetStatsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetStatsResponseValidationError

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

GetStatsResponseValidationError is the validation error returned by GetStatsResponse.Validate if the designated constraints aren't met.

func (GetStatsResponseValidationError) Cause

Cause function returns cause value.

func (GetStatsResponseValidationError) Error

Error satisfies the builtin error interface

func (GetStatsResponseValidationError) ErrorName

ErrorName returns error name.

func (GetStatsResponseValidationError) Field

Field function returns field value.

func (GetStatsResponseValidationError) Key

Key function returns key value.

func (GetStatsResponseValidationError) Reason

Reason function returns reason value.

type Params

type Params struct {
	fx.In

	LC fx.Lifecycle

	Logger    *zap.Logger
	DB        *sql.DB
	JS        *events.JSWrapper
	AppConfig appconfig.IConfig
}

type Server

type Server struct {
	StatsServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(p Params) *Server

func (*Server) GetStats

func (s *Server) GetStats(ctx context.Context, req *GetStatsRequest) (*GetStatsResponse, error)

func (*Server) PermissionUnaryFuncOverride

func (s *Server) PermissionUnaryFuncOverride(ctx context.Context, info *grpc.UnaryServerInfo) (context.Context, error)

func (*Server) RegisterServer

func (s *Server) RegisterServer(srv *grpc.Server)

type Stats

type Stats = map[string]*stats.Stat

type StatsServiceClient

type StatsServiceClient interface {
	GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
}

StatsServiceClient is the client API for StatsService 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 StatsServiceServer

type StatsServiceServer interface {
	GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
	// contains filtered or unexported methods
}

StatsServiceServer is the server API for StatsService service. All implementations must embed UnimplementedStatsServiceServer for forward compatibility

type UnimplementedStatsServiceServer

type UnimplementedStatsServiceServer struct {
}

UnimplementedStatsServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedStatsServiceServer) GetStats

type UnsafeStatsServiceServer

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

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

Jump to

Keyboard shortcuts

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