pb

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MatchServiceName is the fully-qualified name of the MatchService service.
	MatchServiceName = "proto.MatchService"
	// PlayerServiceName is the fully-qualified name of the PlayerService service.
	PlayerServiceName = "proto.PlayerService"
	// StandingServiceName is the fully-qualified name of the StandingService service.
	StandingServiceName = "proto.StandingService"
)
View Source
const (
	// MatchServiceCreateProcedure is the fully-qualified name of the MatchService's Create RPC.
	MatchServiceCreateProcedure = "/proto.MatchService/Create"
	// MatchServiceGetByIDProcedure is the fully-qualified name of the MatchService's GetByID RPC.
	MatchServiceGetByIDProcedure = "/proto.MatchService/GetByID"
	// MatchServiceDeleteProcedure is the fully-qualified name of the MatchService's Delete RPC.
	MatchServiceDeleteProcedure = "/proto.MatchService/Delete"
	// MatchServiceListAllProcedure is the fully-qualified name of the MatchService's ListAll RPC.
	MatchServiceListAllProcedure = "/proto.MatchService/ListAll"
	// PlayerServiceGetByIDProcedure is the fully-qualified name of the PlayerService's GetByID RPC.
	PlayerServiceGetByIDProcedure = "/proto.PlayerService/GetByID"
	// PlayerServiceListAllProcedure is the fully-qualified name of the PlayerService's ListAll RPC.
	PlayerServiceListAllProcedure = "/proto.PlayerService/ListAll"
	// StandingServiceListAllProcedure is the fully-qualified name of the StandingService's ListAll RPC.
	StandingServiceListAllProcedure = "/proto.StandingService/ListAll"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

Variables

View Source
var File_schema_proto protoreflect.FileDescriptor

Functions

func NewMatchServiceHandler

func NewMatchServiceHandler(svc MatchServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewMatchServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewPlayerServiceHandler added in v0.0.3

func NewPlayerServiceHandler(svc PlayerServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewPlayerServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewStandingServiceHandler

func NewStandingServiceHandler(svc StandingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewStandingServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type CreateMatchRequest

type CreateMatchRequest struct {
	White string `protobuf:"bytes,2,opt,name=white,proto3" json:"white,omitempty"`
	Black string `protobuf:"bytes,3,opt,name=black,proto3" json:"black,omitempty"`
	// 1-0 | 0-1 | 1/2-1/2
	Result string `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"`
	// e.g. Sicilian Defence
	Opening  *string                `protobuf:"bytes,5,opt,name=opening,proto3,oneof" json:"opening,omitempty"`
	Moves    int32                  `protobuf:"varint,6,opt,name=moves,proto3" json:"moves,omitempty"`
	PlayedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=played_at,json=playedAt,proto3,oneof" json:"played_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateMatchRequest) Descriptor deprecated

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

Deprecated: Use CreateMatchRequest.ProtoReflect.Descriptor instead.

func (*CreateMatchRequest) GetBlack

func (x *CreateMatchRequest) GetBlack() string

func (*CreateMatchRequest) GetMoves

func (x *CreateMatchRequest) GetMoves() int32

func (*CreateMatchRequest) GetOpening

func (x *CreateMatchRequest) GetOpening() string

func (*CreateMatchRequest) GetPlayedAt

func (x *CreateMatchRequest) GetPlayedAt() *timestamppb.Timestamp

func (*CreateMatchRequest) GetResult

func (x *CreateMatchRequest) GetResult() string

func (*CreateMatchRequest) GetWhite

func (x *CreateMatchRequest) GetWhite() string

func (*CreateMatchRequest) ProtoMessage

func (*CreateMatchRequest) ProtoMessage()

func (*CreateMatchRequest) ProtoReflect

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

func (*CreateMatchRequest) Reset

func (x *CreateMatchRequest) Reset()

func (*CreateMatchRequest) String

func (x *CreateMatchRequest) String() string

func (*CreateMatchRequest) Validate

func (r *CreateMatchRequest) Validate() error

type DeleteMatchRequest

type DeleteMatchRequest struct {
	ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteMatchRequest) Descriptor deprecated

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

Deprecated: Use DeleteMatchRequest.ProtoReflect.Descriptor instead.

func (*DeleteMatchRequest) GetID

func (x *DeleteMatchRequest) GetID() int32

func (*DeleteMatchRequest) ProtoMessage

func (*DeleteMatchRequest) ProtoMessage()

func (*DeleteMatchRequest) ProtoReflect

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

func (*DeleteMatchRequest) Reset

func (x *DeleteMatchRequest) Reset()

func (*DeleteMatchRequest) String

func (x *DeleteMatchRequest) String() string

type GetMatchByIDRequest

type GetMatchByIDRequest struct {
	ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMatchByIDRequest) Descriptor deprecated

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

Deprecated: Use GetMatchByIDRequest.ProtoReflect.Descriptor instead.

func (*GetMatchByIDRequest) GetID

func (x *GetMatchByIDRequest) GetID() int32

func (*GetMatchByIDRequest) ProtoMessage

func (*GetMatchByIDRequest) ProtoMessage()

func (*GetMatchByIDRequest) ProtoReflect

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

func (*GetMatchByIDRequest) Reset

func (x *GetMatchByIDRequest) Reset()

func (*GetMatchByIDRequest) String

func (x *GetMatchByIDRequest) String() string

type GetPlayerByIDRequest added in v0.0.3

type GetPlayerByIDRequest struct {
	ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPlayerByIDRequest) Descriptor deprecated added in v0.0.3

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

Deprecated: Use GetPlayerByIDRequest.ProtoReflect.Descriptor instead.

func (*GetPlayerByIDRequest) GetID added in v0.0.3

func (x *GetPlayerByIDRequest) GetID() int32

func (*GetPlayerByIDRequest) ProtoMessage added in v0.0.3

func (*GetPlayerByIDRequest) ProtoMessage()

func (*GetPlayerByIDRequest) ProtoReflect added in v0.0.3

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

func (*GetPlayerByIDRequest) Reset added in v0.0.3

func (x *GetPlayerByIDRequest) Reset()

func (*GetPlayerByIDRequest) String added in v0.0.3

func (x *GetPlayerByIDRequest) String() string

type ListAllMatchRequest

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

func (*ListAllMatchRequest) Descriptor deprecated

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

Deprecated: Use ListAllMatchRequest.ProtoReflect.Descriptor instead.

func (*ListAllMatchRequest) ProtoMessage

func (*ListAllMatchRequest) ProtoMessage()

func (*ListAllMatchRequest) ProtoReflect

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

func (*ListAllMatchRequest) Reset

func (x *ListAllMatchRequest) Reset()

func (*ListAllMatchRequest) String

func (x *ListAllMatchRequest) String() string

type ListAllMatchResponse

type ListAllMatchResponse struct {
	Matchs []*Match `protobuf:"bytes,1,rep,name=matchs,proto3" json:"matchs,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAllMatchResponse) Descriptor deprecated

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

Deprecated: Use ListAllMatchResponse.ProtoReflect.Descriptor instead.

func (*ListAllMatchResponse) GetMatchs

func (x *ListAllMatchResponse) GetMatchs() []*Match

func (*ListAllMatchResponse) ProtoMessage

func (*ListAllMatchResponse) ProtoMessage()

func (*ListAllMatchResponse) ProtoReflect

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

func (*ListAllMatchResponse) Reset

func (x *ListAllMatchResponse) Reset()

func (*ListAllMatchResponse) String

func (x *ListAllMatchResponse) String() string

type ListAllPlayerRequest added in v0.0.3

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

func (*ListAllPlayerRequest) Descriptor deprecated added in v0.0.3

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

Deprecated: Use ListAllPlayerRequest.ProtoReflect.Descriptor instead.

func (*ListAllPlayerRequest) ProtoMessage added in v0.0.3

func (*ListAllPlayerRequest) ProtoMessage()

func (*ListAllPlayerRequest) ProtoReflect added in v0.0.3

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

func (*ListAllPlayerRequest) Reset added in v0.0.3

func (x *ListAllPlayerRequest) Reset()

func (*ListAllPlayerRequest) String added in v0.0.3

func (x *ListAllPlayerRequest) String() string

type ListAllPlayerResponse added in v0.0.3

type ListAllPlayerResponse struct {
	Players []*Player `protobuf:"bytes,1,rep,name=players,proto3" json:"players,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAllPlayerResponse) Descriptor deprecated added in v0.0.3

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

Deprecated: Use ListAllPlayerResponse.ProtoReflect.Descriptor instead.

func (*ListAllPlayerResponse) GetPlayers added in v0.0.3

func (x *ListAllPlayerResponse) GetPlayers() []*Player

func (*ListAllPlayerResponse) ProtoMessage added in v0.0.3

func (*ListAllPlayerResponse) ProtoMessage()

func (*ListAllPlayerResponse) ProtoReflect added in v0.0.3

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

func (*ListAllPlayerResponse) Reset added in v0.0.3

func (x *ListAllPlayerResponse) Reset()

func (*ListAllPlayerResponse) String added in v0.0.3

func (x *ListAllPlayerResponse) String() string

type ListAllStandingRequest

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

func (*ListAllStandingRequest) Descriptor deprecated

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

Deprecated: Use ListAllStandingRequest.ProtoReflect.Descriptor instead.

func (*ListAllStandingRequest) ProtoMessage

func (*ListAllStandingRequest) ProtoMessage()

func (*ListAllStandingRequest) ProtoReflect

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

func (*ListAllStandingRequest) Reset

func (x *ListAllStandingRequest) Reset()

func (*ListAllStandingRequest) String

func (x *ListAllStandingRequest) String() string

type ListAllStandingResponse

type ListAllStandingResponse struct {
	Standings []*Standing `protobuf:"bytes,1,rep,name=standings,proto3" json:"standings,omitempty"`
	// contains filtered or unexported fields
}

func (*ListAllStandingResponse) Descriptor deprecated

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

Deprecated: Use ListAllStandingResponse.ProtoReflect.Descriptor instead.

func (*ListAllStandingResponse) GetStandings

func (x *ListAllStandingResponse) GetStandings() []*Standing

func (*ListAllStandingResponse) ProtoMessage

func (*ListAllStandingResponse) ProtoMessage()

func (*ListAllStandingResponse) ProtoReflect

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

func (*ListAllStandingResponse) Reset

func (x *ListAllStandingResponse) Reset()

func (*ListAllStandingResponse) String

func (x *ListAllStandingResponse) String() string

type Match

type Match struct {
	ID    int32  `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	White string `protobuf:"bytes,2,opt,name=white,proto3" json:"white,omitempty"`
	Black string `protobuf:"bytes,3,opt,name=black,proto3" json:"black,omitempty"`
	// 1-0 | 0-1 | 1/2-1/2
	Result string `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"`
	// e.g. Sicilian Defence
	Opening   *string                `protobuf:"bytes,5,opt,name=opening,proto3,oneof" json:"opening,omitempty"`
	Moves     int32                  `protobuf:"varint,6,opt,name=moves,proto3" json:"moves,omitempty"`
	PlayedAt  *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=played_at,json=playedAt,proto3" json:"played_at,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Match represents as match entity

func (*Match) Descriptor deprecated

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

Deprecated: Use Match.ProtoReflect.Descriptor instead.

func (*Match) GetBlack

func (x *Match) GetBlack() string

func (*Match) GetCreatedAt

func (x *Match) GetCreatedAt() *timestamppb.Timestamp

func (*Match) GetID

func (x *Match) GetID() int32

func (*Match) GetMoves

func (x *Match) GetMoves() int32

func (*Match) GetOpening

func (x *Match) GetOpening() string

func (*Match) GetPlayedAt

func (x *Match) GetPlayedAt() *timestamppb.Timestamp

func (*Match) GetResult

func (x *Match) GetResult() string

func (*Match) GetWhite

func (x *Match) GetWhite() string

func (*Match) ProtoMessage

func (*Match) ProtoMessage()

func (*Match) ProtoReflect

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

func (*Match) Reset

func (x *Match) Reset()

func (*Match) String

func (x *Match) String() string

type MatchServiceClient

MatchServiceClient is a client for the proto.MatchService service.

func NewMatchServiceClient

func NewMatchServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MatchServiceClient

NewMatchServiceClient constructs a client for the proto.MatchService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type MatchServiceHandler

MatchServiceHandler is an implementation of the proto.MatchService service.

type Player added in v0.0.3

type Player struct {
	ID   int32  `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Elo rating, kept by the secretary
	Rating int32 `protobuf:"varint,3,opt,name=rating,proto3" json:"rating,omitempty"`
	// e.g. GM, IM, FM
	Title    *string                `protobuf:"bytes,4,opt,name=title,proto3,oneof" json:"title,omitempty"`
	JoinedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=joined_at,json=joinedAt,proto3" json:"joined_at,omitempty"`
	// contains filtered or unexported fields
}

Player is the club roster, written on the server and read by members.

func (*Player) Descriptor deprecated added in v0.0.3

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

Deprecated: Use Player.ProtoReflect.Descriptor instead.

func (*Player) GetID added in v0.0.3

func (x *Player) GetID() int32

func (*Player) GetJoinedAt added in v0.0.3

func (x *Player) GetJoinedAt() *timestamppb.Timestamp

func (*Player) GetName added in v0.0.3

func (x *Player) GetName() string

func (*Player) GetRating added in v0.0.3

func (x *Player) GetRating() int32

func (*Player) GetTitle added in v0.0.3

func (x *Player) GetTitle() string

func (*Player) ProtoMessage added in v0.0.3

func (*Player) ProtoMessage()

func (*Player) ProtoReflect added in v0.0.3

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

func (*Player) Reset added in v0.0.3

func (x *Player) Reset()

func (*Player) String added in v0.0.3

func (x *Player) String() string

type PlayerServiceClient added in v0.0.3

PlayerServiceClient is a client for the proto.PlayerService service.

func NewPlayerServiceClient added in v0.0.3

func NewPlayerServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) PlayerServiceClient

NewPlayerServiceClient constructs a client for the proto.PlayerService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type PlayerServiceHandler added in v0.0.3

PlayerServiceHandler is an implementation of the proto.PlayerService service.

type Standing

type Standing struct {

	// Place in the table, 1 is best
	ID     int32  `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Player string `protobuf:"bytes,2,opt,name=player,proto3" json:"player,omitempty"`
	Played int32  `protobuf:"varint,3,opt,name=played,proto3" json:"played,omitempty"`
	Wins   int32  `protobuf:"varint,4,opt,name=wins,proto3" json:"wins,omitempty"`
	Draws  int32  `protobuf:"varint,5,opt,name=draws,proto3" json:"draws,omitempty"`
	Losses int32  `protobuf:"varint,6,opt,name=losses,proto3" json:"losses,omitempty"`
	// Win 1, draw 0.5
	Points float64 `protobuf:"fixed64,7,opt,name=points,proto3" json:"points,omitempty"`
	// contains filtered or unexported fields
}

Standing represents as standing entity

func (*Standing) Descriptor deprecated

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

Deprecated: Use Standing.ProtoReflect.Descriptor instead.

func (*Standing) GetDraws

func (x *Standing) GetDraws() int32

func (*Standing) GetID

func (x *Standing) GetID() int32

func (*Standing) GetLosses

func (x *Standing) GetLosses() int32

func (*Standing) GetPlayed

func (x *Standing) GetPlayed() int32

func (*Standing) GetPlayer

func (x *Standing) GetPlayer() string

func (*Standing) GetPoints

func (x *Standing) GetPoints() float64

func (*Standing) GetWins

func (x *Standing) GetWins() int32

func (*Standing) ProtoMessage

func (*Standing) ProtoMessage()

func (*Standing) ProtoReflect

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

func (*Standing) Reset

func (x *Standing) Reset()

func (*Standing) String

func (x *Standing) String() string

type StandingServiceClient

type StandingServiceClient interface {
	ListAll(context.Context, *connect.Request[ListAllStandingRequest]) (*connect.Response[ListAllStandingResponse], error)
}

StandingServiceClient is a client for the proto.StandingService service.

func NewStandingServiceClient

func NewStandingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) StandingServiceClient

NewStandingServiceClient constructs a client for the proto.StandingService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type StandingServiceHandler

type StandingServiceHandler interface {
	ListAll(context.Context, *connect.Request[ListAllStandingRequest]) (*connect.Response[ListAllStandingResponse], error)
}

StandingServiceHandler is an implementation of the proto.StandingService service.

type UnimplementedMatchServiceHandler

type UnimplementedMatchServiceHandler struct{}

UnimplementedMatchServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedMatchServiceHandler) Create

func (UnimplementedMatchServiceHandler) GetByID

type UnimplementedPlayerServiceHandler added in v0.0.3

type UnimplementedPlayerServiceHandler struct{}

UnimplementedPlayerServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedPlayerServiceHandler) GetByID added in v0.0.3

func (UnimplementedPlayerServiceHandler) ListAll added in v0.0.3

type UnimplementedStandingServiceHandler

type UnimplementedStandingServiceHandler struct{}

UnimplementedStandingServiceHandler returns CodeUnimplemented from all methods.

type ValidateInterceptor

type ValidateInterceptor struct{}

ValidateInterceptor calls the generated Validate() method on any request message that implements it

func NewValidateInterceptor

func NewValidateInterceptor() *ValidateInterceptor

func (*ValidateInterceptor) WrapStreamingClient

WrapStreamingClient implements connect.Interceptor.

func (*ValidateInterceptor) WrapStreamingHandler

WrapStreamingHandler implements connect.Interceptor.

func (*ValidateInterceptor) WrapUnary

WrapUnary implements connect.Interceptor.

Jump to

Keyboard shortcuts

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