pb

package
v0.0.0-...-4144884 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package pb contains generated code for golang server implementations of pnp-tools services.

Index

Constants

View Source
const (
	GameManager_StartGame_FullMethodName    = "/GameManager/StartGame"
	GameManager_Invite_FullMethodName       = "/GameManager/Invite"
	GameManager_CurrentGames_FullMethodName = "/GameManager/CurrentGames"
	GameManager_Game_FullMethodName         = "/GameManager/Game"
)
View Source
const (
	Entry_Invite_FullMethodName  = "/Entry/Invite"
	Entry_SignUp_FullMethodName  = "/Entry/SignUp"
	Entry_Login_FullMethodName   = "/Entry/Login"
	Entry_Current_FullMethodName = "/Entry/Current"
)

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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)

View Source
var File_general_proto protoreflect.FileDescriptor
View Source
var File_player_proto protoreflect.FileDescriptor
View Source
var File_protoql_options_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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

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) Descriptor() ([]byte, []int)

Deprecated: Use Game.ProtoReflect.Descriptor instead.

func (*Game) GetFatemaster

func (x *Game) GetFatemaster() *Player

func (*Game) GetId

func (x *Game) GetId() string

func (*Game) GetName

func (x *Game) GetName() string

func (*Game) ProtoMessage

func (*Game) ProtoMessage()

func (*Game) ProtoReflect

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

func (*Game) Reset

func (x *Game) Reset()

func (*Game) String

func (x *Game) String() string

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use IDRequest.ProtoReflect.Descriptor instead.

func (*IDRequest) GetId

func (x *IDRequest) GetId() string

func (*IDRequest) ProtoMessage

func (*IDRequest) ProtoMessage()

func (*IDRequest) ProtoReflect

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

func (*IDRequest) Reset

func (x *IDRequest) Reset()

func (*IDRequest) String

func (x *IDRequest) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Player.ProtoReflect.Descriptor instead.

func (*Player) GetEmail

func (x *Player) GetEmail() string

func (*Player) GetId

func (x *Player) GetId() string

func (*Player) GetName

func (x *Player) GetName() string

func (*Player) ProtoMessage

func (*Player) ProtoMessage()

func (*Player) ProtoReflect

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

func (*Player) Reset

func (x *Player) Reset()

func (*Player) String

func (x *Player) String() string

type PlayerGames_Iterator

type PlayerGames_Iterator interface {
	Next() (*Game, error)
	Err() error
	Close()
}

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

func (w *ProtoQLWrapper[T]) Begin(ctx context.Context, opts ...T) (context.Context, error)

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

func (w *ProtoQLWrapper[T]) CreatePlayer(ctx context.Context, m *Player) (*Player, error)

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

func (w *ProtoQLWrapper[T]) ReadPlayer(ctx context.Context, id string) (*Player, error)

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.

func (*ProtoQLWrapper[T]) Rollback

func (w *ProtoQLWrapper[T]) Rollback(ctx context.Context) error

Rollback will rollback the transaction stored in ctx. After calling this, ctx will be closed and should no longer be used.

func (*ProtoQLWrapper[T]) StartGame

func (w *ProtoQLWrapper[T]) StartGame(ctx context.Context, fatemasterID string, game *Game) (outGame *Game, _ error)

StartGame runs the custom query startGame, 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) Descriptor() ([]byte, []int)

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetName

func (x *Query) GetName() string

func (*Query) GetQuery

func (x *Query) GetQuery() string

func (*Query) GetRead

func (x *Query) GetRead() *Read

func (*Query) GetReadOne

func (x *Query) GetReadOne() *ReadOne

func (*Query) GetTyp

func (m *Query) GetTyp() isQuery_Typ

func (*Query) GetWrite

func (x *Query) GetWrite() *Write

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

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

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Read.ProtoReflect.Descriptor instead.

func (*Read) GetParams

func (x *Read) GetParams() []*Variable

func (*Read) GetResults

func (x *Read) GetResults() []*Variable

func (*Read) ProtoMessage

func (*Read) ProtoMessage()

func (*Read) ProtoReflect

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

func (*Read) Reset

func (x *Read) Reset()

func (*Read) String

func (x *Read) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use ReadOne.ProtoReflect.Descriptor instead.

func (*ReadOne) GetParams

func (x *ReadOne) GetParams() []*Variable

func (*ReadOne) GetResults

func (x *ReadOne) GetResults() []*Variable

func (*ReadOne) ProtoMessage

func (*ReadOne) ProtoMessage()

func (*ReadOne) ProtoReflect

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

func (*ReadOne) Reset

func (x *ReadOne) Reset()

func (*ReadOne) String

func (x *ReadOne) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Relation.ProtoReflect.Descriptor instead.

func (*Relation) GetName

func (x *Relation) GetName() string

func (*Relation) GetNamespace

func (x *Relation) GetNamespace() string

func (*Relation) ProtoMessage

func (*Relation) ProtoMessage()

func (*Relation) ProtoReflect

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

func (*Relation) Reset

func (x *Relation) Reset()

func (*Relation) String

func (x *Relation) String() string

type UnimplementedEntryServer

type UnimplementedEntryServer struct {
}

UnimplementedEntryServer should be embedded to have forward compatible implementations.

func (UnimplementedEntryServer) Current

func (UnimplementedEntryServer) Invite

func (UnimplementedEntryServer) Login

func (UnimplementedEntryServer) SignUp

type UnimplementedGameManagerServer

type UnimplementedGameManagerServer struct {
}

UnimplementedGameManagerServer should be embedded to have forward compatible implementations.

func (UnimplementedGameManagerServer) CurrentGames

func (UnimplementedGameManagerServer) Game

func (UnimplementedGameManagerServer) Invite

func (UnimplementedGameManagerServer) StartGame

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) Descriptor() ([]byte, []int)

Deprecated: Use Variable.ProtoReflect.Descriptor instead.

func (*Variable) GetName

func (x *Variable) GetName() string

func (*Variable) GetTyp

func (x *Variable) GetTyp() string

func (*Variable) ProtoMessage

func (*Variable) ProtoMessage()

func (*Variable) ProtoReflect

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

func (*Variable) Reset

func (x *Variable) Reset()

func (*Variable) String

func (x *Variable) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Write.ProtoReflect.Descriptor instead.

func (*Write) GetParams

func (x *Write) GetParams() []*Variable

func (*Write) ProtoMessage

func (*Write) ProtoMessage()

func (*Write) ProtoReflect

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

func (*Write) Reset

func (x *Write) Reset()

func (*Write) String

func (x *Write) String() string

Jump to

Keyboard shortcuts

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