Documentation
¶
Overview ¶
Package pb contains generated code for golang server implementations of pnp-tools services.
Index ¶
- Constants
- Variables
- func RegisterEntryServer(s grpc.ServiceRegistrar, srv EntryServer)
- func RegisterGameManagerServer(s grpc.ServiceRegistrar, srv GameManagerServer)
- type Empty
- type EntryClient
- type EntryServer
- type Game
- type GameManagerClient
- type GameManagerServer
- type GameMessage
- type GamesResponse
- type IDRequest
- type InviteRequest
- func (*InviteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InviteRequest) GetEmail() string
- func (x *InviteRequest) GetGameId() string
- func (*InviteRequest) ProtoMessage()
- func (x *InviteRequest) ProtoReflect() protoreflect.Message
- func (x *InviteRequest) Reset()
- func (x *InviteRequest) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type Player
- type PlayerGames_Iterator
- type PlayerMessage
- type PlayerPassword
- func (*PlayerPassword) Descriptor() ([]byte, []int)deprecated
- func (x *PlayerPassword) GetPassword() string
- func (x *PlayerPassword) GetPlayer() *Player
- func (*PlayerPassword) ProtoMessage()
- func (x *PlayerPassword) ProtoReflect() protoreflect.Message
- func (x *PlayerPassword) Reset()
- func (x *PlayerPassword) String() string
- type ProtoQLWrapper
- func (w *ProtoQLWrapper[T]) Begin(ctx context.Context, opts ...T) (context.Context, error)
- func (w *ProtoQLWrapper[T]) Commit(ctx context.Context) error
- func (w *ProtoQLWrapper[T]) CreatePlayer(ctx context.Context, m *Player) (*Player, error)
- func (w *ProtoQLWrapper[T]) GameDetail(ctx context.Context, playerID string, gameID string) (game *Game, fatemasterID string, _ error)
- func (w *ProtoQLWrapper[T]) Login(ctx context.Context, email string) (player *Player, passhash string, _ error)
- func (w *ProtoQLWrapper[T]) PlayerGames(ctx context.Context, playerID string) (PlayerGames_Iterator, error)
- func (w *ProtoQLWrapper[T]) ReadPlayer(ctx context.Context, id string) (*Player, error)
- func (w *ProtoQLWrapper[T]) RegisterPlayer(ctx context.Context, playerPass *PlayerPassword) (player *Player, _ error)
- func (w *ProtoQLWrapper[T]) Rollback(ctx context.Context) error
- func (w *ProtoQLWrapper[T]) StartGame(ctx context.Context, fatemasterID string, game *Game) (outGame *Game, _ error)
- type Query
- func (*Query) Descriptor() ([]byte, []int)deprecated
- func (x *Query) GetName() string
- func (x *Query) GetQuery() string
- func (x *Query) GetRead() *Read
- func (x *Query) GetReadOne() *ReadOne
- func (m *Query) GetTyp() isQuery_Typ
- func (x *Query) GetWrite() *Write
- func (*Query) ProtoMessage()
- func (x *Query) ProtoReflect() protoreflect.Message
- func (x *Query) Reset()
- func (x *Query) String() string
- type Query_Read
- type Query_ReadOne
- type Query_Write
- type Read
- type ReadOne
- type Relation
- type UnimplementedEntryServer
- func (UnimplementedEntryServer) Current(context.Context, *Empty) (*PlayerMessage, error)
- func (UnimplementedEntryServer) Invite(context.Context, *PlayerMessage) (*PlayerMessage, error)
- func (UnimplementedEntryServer) Login(context.Context, *LoginRequest) (*PlayerMessage, error)
- func (UnimplementedEntryServer) SignUp(context.Context, *PlayerPassword) (*PlayerMessage, error)
- type UnimplementedGameManagerServer
- func (UnimplementedGameManagerServer) CurrentGames(context.Context, *Empty) (*GamesResponse, error)
- func (UnimplementedGameManagerServer) Game(context.Context, *IDRequest) (*GameMessage, error)
- func (UnimplementedGameManagerServer) Invite(context.Context, *InviteRequest) (*Player, error)
- func (UnimplementedGameManagerServer) StartGame(context.Context, *GameMessage) (*GameMessage, error)
- type UnsafeEntryServer
- type UnsafeGameManagerServer
- type Variable
- type Write
Constants ¶
const ( GameManager_StartGame_FullMethodName = "/GameManager/StartGame" GameManager_Invite_FullMethodName = "/GameManager/Invite" GameManager_CurrentGames_FullMethodName = "/GameManager/CurrentGames" GameManager_Game_FullMethodName = "/GameManager/Game" )
const ( Entry_Invite_FullMethodName = "/Entry/Invite" Entry_SignUp_FullMethodName = "/Entry/SignUp" Entry_Login_FullMethodName = "/Entry/Login" Entry_Current_FullMethodName = "/Entry/Current" )
Variables ¶
var ( // primary_key tells protoc-gen-go-queries that the field is a primary key and // may be used to identify rows. If multiple fields are marked as a primary // key, they will be treated as a multi-column primary key. // // optional bool primary_key = 3000; E_PrimaryKey = &file_protoql_options_proto_extTypes[0] // skip allows you to skip individual fields. Setting this to true will skip a // field. // // optional bool skip = 3001; E_Skip = &file_protoql_options_proto_extTypes[1] // flatten tells protoql to treat sub-fields of this field as if they were // part of the parent message type. // // Example: // // message Account { // string email = 1 [(protoql.primary_key) = 1]; // } // // message AccountPass { // option (protoql.rel) = {namespace="public",name="account"}; // Account account = 1 [(protoql.flatten) = true]; // string passhash = 2; // } // // optional bool flatten = 3002; E_Flatten = &file_protoql_options_proto_extTypes[2] // column may be used to explicitly define the column name rather than relying // on autogenerated column names. // // optional string column = 3003; E_Column = &file_protoql_options_proto_extTypes[3] // generated may be used to tell protoql that this field should not be // included in query arguments (e.g. autogenerated `Create` methods or uses of // `varFields` in custom queries). It will still be scanned in result sets. // // optional bool generated = 3004; E_Generated = &file_protoql_options_proto_extTypes[4] )
Extension fields to descriptorpb.FieldOptions.
var ( // gen may be used on a message type to enable or disable query generation for // the message type. // // optional bool gen = 3000; E_Gen = &file_protoql_options_proto_extTypes[5] // rel may be used to explicitly define a relation that this message is // associated with. Messages that are associated with more than one relation // should be configured either on fields or in a config file. // // optional protoql.Relation rel = 3001; E_Rel = &file_protoql_options_proto_extTypes[6] // json may be used to tell protoql to implement driver.Valuer and sql.Scanner // methods on the message type in order to store the message as JSON data. // // optional bool json = 3002; E_Json = &file_protoql_options_proto_extTypes[7] // composite may be used to tell protoql that this is a custom composite type // and that fields of this type should be accessed using 'colname.fieldname' // syntax. // // optional bool composite = 3003; E_Composite = &file_protoql_options_proto_extTypes[8] )
Extension fields to descriptorpb.MessageOptions.
var ( // gen_messages sets the default `gen` option on messages in a whole file. // This may be overridden on individual message types within the file. // // optional bool gen_messages = 3000; E_GenMessages = &file_protoql_options_proto_extTypes[10] // query allows for defining custom queries. // // repeated protoql.Query query = 3001; E_Query = &file_protoql_options_proto_extTypes[11] )
Extension fields to descriptorpb.FileOptions.
var ( // sql_value sets the database value of an enum value. This will be used // instead of the default when translating to/from values in the database. // // optional string sql_value = 3000; E_SqlValue = &file_protoql_options_proto_extTypes[9] )
Extension fields to descriptorpb.EnumValueOptions.
var Entry_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Entry", HandlerType: (*EntryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Invite", Handler: _Entry_Invite_Handler, }, { MethodName: "SignUp", Handler: _Entry_SignUp_Handler, }, { MethodName: "Login", Handler: _Entry_Login_Handler, }, { MethodName: "Current", Handler: _Entry_Current_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "player.proto", }
Entry_ServiceDesc is the grpc.ServiceDesc for Entry service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_game_proto protoreflect.FileDescriptor
var File_general_proto protoreflect.FileDescriptor
var File_player_proto protoreflect.FileDescriptor
var File_protoql_options_proto protoreflect.FileDescriptor
var GameManager_ServiceDesc = grpc.ServiceDesc{ ServiceName: "GameManager", HandlerType: (*GameManagerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "StartGame", Handler: _GameManager_StartGame_Handler, }, { MethodName: "Invite", Handler: _GameManager_Invite_Handler, }, { MethodName: "CurrentGames", Handler: _GameManager_CurrentGames_Handler, }, { MethodName: "Game", Handler: _GameManager_Game_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "game.proto", }
GameManager_ServiceDesc is the grpc.ServiceDesc for GameManager service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterEntryServer ¶
func RegisterEntryServer(s grpc.ServiceRegistrar, srv EntryServer)
func RegisterGameManagerServer ¶
func RegisterGameManagerServer(s grpc.ServiceRegistrar, srv GameManagerServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type EntryClient ¶
type EntryClient interface { Invite(ctx context.Context, in *PlayerMessage, opts ...grpc.CallOption) (*PlayerMessage, error) SignUp(ctx context.Context, in *PlayerPassword, opts ...grpc.CallOption) (*PlayerMessage, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*PlayerMessage, error) Current(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PlayerMessage, error) }
EntryClient is the client API for Entry 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 NewEntryClient ¶
func NewEntryClient(cc grpc.ClientConnInterface) EntryClient
type EntryServer ¶
type EntryServer interface { Invite(context.Context, *PlayerMessage) (*PlayerMessage, error) SignUp(context.Context, *PlayerPassword) (*PlayerMessage, error) Login(context.Context, *LoginRequest) (*PlayerMessage, error) Current(context.Context, *Empty) (*PlayerMessage, error) }
EntryServer is the server API for Entry service. All implementations should embed UnimplementedEntryServer for forward compatibility
type Game ¶
type Game struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Fatemaster *Player `protobuf:"bytes,3,opt,name=fatemaster,proto3" json:"fatemaster,omitempty"` // contains filtered or unexported fields }
func (*Game) Descriptor
deprecated
func (*Game) GetFatemaster ¶
func (*Game) ProtoMessage ¶
func (*Game) ProtoMessage()
func (*Game) ProtoReflect ¶
func (x *Game) ProtoReflect() protoreflect.Message
type GameManagerClient ¶
type GameManagerClient interface { StartGame(ctx context.Context, in *GameMessage, opts ...grpc.CallOption) (*GameMessage, error) Invite(ctx context.Context, in *InviteRequest, opts ...grpc.CallOption) (*Player, error) CurrentGames(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GamesResponse, error) Game(ctx context.Context, in *IDRequest, opts ...grpc.CallOption) (*GameMessage, error) }
GameManagerClient is the client API for GameManager 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 NewGameManagerClient ¶
func NewGameManagerClient(cc grpc.ClientConnInterface) GameManagerClient
type GameManagerServer ¶
type GameManagerServer interface { StartGame(context.Context, *GameMessage) (*GameMessage, error) Invite(context.Context, *InviteRequest) (*Player, error) CurrentGames(context.Context, *Empty) (*GamesResponse, error) Game(context.Context, *IDRequest) (*GameMessage, error) }
GameManagerServer is the server API for GameManager service. All implementations should embed UnimplementedGameManagerServer for forward compatibility
type GameMessage ¶
type GameMessage struct { Game *Game `protobuf:"bytes,1,opt,name=game,proto3" json:"game,omitempty"` // contains filtered or unexported fields }
func (*GameMessage) Descriptor
deprecated
func (*GameMessage) Descriptor() ([]byte, []int)
Deprecated: Use GameMessage.ProtoReflect.Descriptor instead.
func (*GameMessage) GetGame ¶
func (x *GameMessage) GetGame() *Game
func (*GameMessage) ProtoMessage ¶
func (*GameMessage) ProtoMessage()
func (*GameMessage) ProtoReflect ¶
func (x *GameMessage) ProtoReflect() protoreflect.Message
func (*GameMessage) Reset ¶
func (x *GameMessage) Reset()
func (*GameMessage) String ¶
func (x *GameMessage) String() string
type GamesResponse ¶
type GamesResponse struct { Games []*Game `protobuf:"bytes,1,rep,name=games,proto3" json:"games,omitempty"` // contains filtered or unexported fields }
func (*GamesResponse) Descriptor
deprecated
func (*GamesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GamesResponse.ProtoReflect.Descriptor instead.
func (*GamesResponse) GetGames ¶
func (x *GamesResponse) GetGames() []*Game
func (*GamesResponse) ProtoMessage ¶
func (*GamesResponse) ProtoMessage()
func (*GamesResponse) ProtoReflect ¶
func (x *GamesResponse) ProtoReflect() protoreflect.Message
func (*GamesResponse) Reset ¶
func (x *GamesResponse) Reset()
func (*GamesResponse) String ¶
func (x *GamesResponse) String() string
type IDRequest ¶
type IDRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*IDRequest) Descriptor
deprecated
func (*IDRequest) ProtoMessage ¶
func (*IDRequest) ProtoMessage()
func (*IDRequest) ProtoReflect ¶
func (x *IDRequest) ProtoReflect() protoreflect.Message
type InviteRequest ¶
type InviteRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` GameId string `protobuf:"bytes,2,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"` // contains filtered or unexported fields }
func (*InviteRequest) Descriptor
deprecated
func (*InviteRequest) Descriptor() ([]byte, []int)
Deprecated: Use InviteRequest.ProtoReflect.Descriptor instead.
func (*InviteRequest) GetEmail ¶
func (x *InviteRequest) GetEmail() string
func (*InviteRequest) GetGameId ¶
func (x *InviteRequest) GetGameId() string
func (*InviteRequest) ProtoMessage ¶
func (*InviteRequest) ProtoMessage()
func (*InviteRequest) ProtoReflect ¶
func (x *InviteRequest) ProtoReflect() protoreflect.Message
func (*InviteRequest) Reset ¶
func (x *InviteRequest) Reset()
func (*InviteRequest) String ¶
func (x *InviteRequest) String() string
type LoginRequest ¶
type LoginRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type Player ¶
type Player struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*Player) Descriptor
deprecated
func (*Player) ProtoMessage ¶
func (*Player) ProtoMessage()
func (*Player) ProtoReflect ¶
func (x *Player) ProtoReflect() protoreflect.Message
type PlayerGames_Iterator ¶
PlayerGames_Iterator is an iterator for results from the PlayerGames method.
Close will be called automatically when the context.Context passed to PlayerGames is done, but it is still good practice to 'defer rows.Close()' in the calling context (e.g. for if/when the project switches to a different database library/tool).
type PlayerMessage ¶
type PlayerMessage struct { Player *Player `protobuf:"bytes,1,opt,name=player,proto3" json:"player,omitempty"` // contains filtered or unexported fields }
func (*PlayerMessage) Descriptor
deprecated
func (*PlayerMessage) Descriptor() ([]byte, []int)
Deprecated: Use PlayerMessage.ProtoReflect.Descriptor instead.
func (*PlayerMessage) GetPlayer ¶
func (x *PlayerMessage) GetPlayer() *Player
func (*PlayerMessage) ProtoMessage ¶
func (*PlayerMessage) ProtoMessage()
func (*PlayerMessage) ProtoReflect ¶
func (x *PlayerMessage) ProtoReflect() protoreflect.Message
func (*PlayerMessage) Reset ¶
func (x *PlayerMessage) Reset()
func (*PlayerMessage) String ¶
func (x *PlayerMessage) String() string
type PlayerPassword ¶
type PlayerPassword struct { Player *Player `protobuf:"bytes,1,opt,name=player,proto3" json:"player,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*PlayerPassword) Descriptor
deprecated
func (*PlayerPassword) Descriptor() ([]byte, []int)
Deprecated: Use PlayerPassword.ProtoReflect.Descriptor instead.
func (*PlayerPassword) GetPassword ¶
func (x *PlayerPassword) GetPassword() string
func (*PlayerPassword) GetPlayer ¶
func (x *PlayerPassword) GetPlayer() *Player
func (*PlayerPassword) ProtoMessage ¶
func (*PlayerPassword) ProtoMessage()
func (*PlayerPassword) ProtoReflect ¶
func (x *PlayerPassword) ProtoReflect() protoreflect.Message
func (*PlayerPassword) Reset ¶
func (x *PlayerPassword) Reset()
func (*PlayerPassword) String ¶
func (x *PlayerPassword) String() string
type ProtoQLWrapper ¶
type ProtoQLWrapper[T any] struct { // contains filtered or unexported fields }
ProtoQLWrapper is a wrapper type around a database connection that generated query functions are attached to as methods. We do this to make database queries easier to mock in tests.
func NewProtoQL ¶
func NewProtoQL[T any](store protoql.Store[T]) *ProtoQLWrapper[T]
NewProtoQL creates a new ProtoQLWrapper around a storage implementation.
func (*ProtoQLWrapper[T]) Begin ¶
Begin starts a new transaction, returning a context.Context that may be passed to methods in order to have those methods run within the transaction.
If ctx.Done() is closed before w.Commit(ctx) is called, then w.Rollback(ctx) will automatically be called. This means that it is not strictly necessary to call 'defer w.Rollback(ctx)' after a call to Begin. However, w.Commit(ctx) must be called to commit the transaction, otherwise it will be rolled back.
if ctx.Done() returns nil (i.e. this context can never be cancelled), then Begin will return an error. We do this to make it harder to accidentally leave a transaction open indefinitely.
func (*ProtoQLWrapper[T]) Commit ¶
func (w *ProtoQLWrapper[T]) Commit(ctx context.Context) error
Commit will commit the transaction stored in ctx. After calling this, ctx will be closed and should no longer be used.
func (*ProtoQLWrapper[T]) CreatePlayer ¶
CreatePlayer creates a new record in the database for m. The returned value will include any auto-generated values from the database.
func (*ProtoQLWrapper[T]) GameDetail ¶
func (w *ProtoQLWrapper[T]) GameDetail(ctx context.Context, playerID string, gameID string) (game *Game, fatemasterID string, _ error)
GameDetail runs the custom query gameDetail, returning the first result if at least one is found, or protoql.ErrNoRows if no rows are found.
func (*ProtoQLWrapper[T]) Login ¶
func (w *ProtoQLWrapper[T]) Login(ctx context.Context, email string) (player *Player, passhash string, _ error)
Login runs the custom query login, returning the first result if at least one is found, or protoql.ErrNoRows if no rows are found.
func (*ProtoQLWrapper[T]) PlayerGames ¶
func (w *ProtoQLWrapper[T]) PlayerGames(ctx context.Context, playerID string) (PlayerGames_Iterator, error)
PlayerGames runs the custom query playerGames, returning an iterator for results from the query.
An error will be returned if ctx.Done() returns nil. If you want a query to stay open for the life of the program, create a top-level 'context.WithCancel(context.Background())' and pass it around.
When ctx.Done() is closed, the returned PlayerGames_Iterator will automatically be closed. This is to prevent simple mistakes (e.g. forgetting to 'defer rows.Close()') from causing difficult-to-diagnose runtime errors. It's never fun to find out you've been leaking connections in prod at 1AM.
func (*ProtoQLWrapper[T]) ReadPlayer ¶
ReadPlayer reads a single Player from the database, identified by its primary key(s).
func (*ProtoQLWrapper[T]) RegisterPlayer ¶
func (w *ProtoQLWrapper[T]) RegisterPlayer(ctx context.Context, playerPass *PlayerPassword) (player *Player, _ error)
RegisterPlayer runs the custom query registerPlayer, returning the first result if at least one is found, or protoql.ErrNoRows if no rows are found.
type Query ¶
type Query struct { // name is a unique name to identify this query by. It will be the resulting // method's name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // query is the SQL that will be run. Parameters and results may be referenced // in this query using golang text/template syntax in order to ensure that // query variables and scan order is what you expect. // // See the `git.sr.ht/~nelsam/protoql/custom` package docs for details about // the template functionality available here. Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` // typ is the type of this query and contains param/result types. // // Types that are assignable to Typ: // // *Query_Write // *Query_ReadOne // *Query_Read Typ isQuery_Typ `protobuf_oneof:"typ"` // contains filtered or unexported fields }
Query represents a single custom query that will generate a custom query method.
func (*Query) Descriptor
deprecated
func (*Query) GetReadOne ¶
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) ProtoReflect ¶
func (x *Query) ProtoReflect() protoreflect.Message
type Query_Read ¶
type Query_Read struct {
Read *Read `protobuf:"bytes,5,opt,name=read,proto3,oneof"`
}
type Query_ReadOne ¶
type Query_ReadOne struct {
ReadOne *ReadOne `protobuf:"bytes,4,opt,name=read_one,json=readOne,proto3,oneof"`
}
type Query_Write ¶
type Query_Write struct {
Write *Write `protobuf:"bytes,3,opt,name=write,proto3,oneof"`
}
type Read ¶
type Read struct { Params []*Variable `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` Results []*Variable `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
Read represents a query that will read multiple tuples. The generated code will return an iterator that will scan and return tuples on demand.
func (*Read) Descriptor
deprecated
func (*Read) GetResults ¶
func (*Read) ProtoMessage ¶
func (*Read) ProtoMessage()
func (*Read) ProtoReflect ¶
func (x *Read) ProtoReflect() protoreflect.Message
type ReadOne ¶
type ReadOne struct { Params []*Variable `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` Results []*Variable `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
ReadOne represents a query that will read a single tuple from the database. The generated code will automatically scan the tuple and return it.
func (*ReadOne) Descriptor
deprecated
func (*ReadOne) GetResults ¶
func (*ReadOne) ProtoMessage ¶
func (*ReadOne) ProtoMessage()
func (*ReadOne) ProtoReflect ¶
func (x *ReadOne) ProtoReflect() protoreflect.Message
type Relation ¶
type Relation struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // contains filtered or unexported fields }
Relation is an SQL relation - for exaample, a table. For the purposes of protoql, a relation has a namespace (usually a schema) and a name.
func (*Relation) Descriptor
deprecated
func (*Relation) GetNamespace ¶
func (*Relation) ProtoMessage ¶
func (*Relation) ProtoMessage()
func (*Relation) ProtoReflect ¶
func (x *Relation) ProtoReflect() protoreflect.Message
type UnimplementedEntryServer ¶
type UnimplementedEntryServer struct { }
UnimplementedEntryServer should be embedded to have forward compatible implementations.
func (UnimplementedEntryServer) Current ¶
func (UnimplementedEntryServer) Current(context.Context, *Empty) (*PlayerMessage, error)
func (UnimplementedEntryServer) Invite ¶
func (UnimplementedEntryServer) Invite(context.Context, *PlayerMessage) (*PlayerMessage, error)
func (UnimplementedEntryServer) Login ¶
func (UnimplementedEntryServer) Login(context.Context, *LoginRequest) (*PlayerMessage, error)
func (UnimplementedEntryServer) SignUp ¶
func (UnimplementedEntryServer) SignUp(context.Context, *PlayerPassword) (*PlayerMessage, error)
type UnimplementedGameManagerServer ¶
type UnimplementedGameManagerServer struct { }
UnimplementedGameManagerServer should be embedded to have forward compatible implementations.
func (UnimplementedGameManagerServer) CurrentGames ¶
func (UnimplementedGameManagerServer) CurrentGames(context.Context, *Empty) (*GamesResponse, error)
func (UnimplementedGameManagerServer) Game ¶
func (UnimplementedGameManagerServer) Game(context.Context, *IDRequest) (*GameMessage, error)
func (UnimplementedGameManagerServer) Invite ¶
func (UnimplementedGameManagerServer) Invite(context.Context, *InviteRequest) (*Player, error)
func (UnimplementedGameManagerServer) StartGame ¶
func (UnimplementedGameManagerServer) StartGame(context.Context, *GameMessage) (*GameMessage, error)
type UnsafeEntryServer ¶
type UnsafeEntryServer interface {
// contains filtered or unexported methods
}
UnsafeEntryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EntryServer will result in compilation errors.
type UnsafeGameManagerServer ¶
type UnsafeGameManagerServer interface {
// contains filtered or unexported methods
}
UnsafeGameManagerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GameManagerServer will result in compilation errors.
type Variable ¶
type Variable struct { // name is used as the parameter or result name in the generated go code and // for referencing parameters or results in custom queries. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // typ must match either a protobuf scalar type or the name of a custom type // (enum, message, etc). If the type is imported and the import specifies a // package namespace, typ should include the namespace. The file in question // *must* be imported, even if the import is not otherwise used. // // For example, to use an Account message type imported from a // 'user'-namespaced file, typ should be "user.Account". Typ string `protobuf:"bytes,2,opt,name=typ,proto3" json:"typ,omitempty"` // contains filtered or unexported fields }
Variable represents any variable, parameter, or return value.
func (*Variable) Descriptor
deprecated
func (*Variable) ProtoMessage ¶
func (*Variable) ProtoMessage()
func (*Variable) ProtoReflect ¶
func (x *Variable) ProtoReflect() protoreflect.Message
type Write ¶
type Write struct { Params []*Variable `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
Write represents a write-only query.
func (*Write) Descriptor
deprecated
func (*Write) ProtoMessage ¶
func (*Write) ProtoMessage()
func (*Write) ProtoReflect ¶
func (x *Write) ProtoReflect() protoreflect.Message