client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// APIServerURL URL API to make calls
	APIServerURL string // API_SERVER_URL

	// ClientCertfile client certificate TLS location file
	ClientCertfile string // CLIENT_CERTFILE

	// ServerNameOverride is for testing only. If set to a non empty string,
	// it will override the virtual host name of authority (e.g. :authority header
	// field) in requests.
	ServerNameOverride string // SERVERNAME_OVERRIDE

	// AuthToken token authenticated to make API calls
	AuthToken string // oauth2.*.token

)

Functions

func InitConn

func InitConn() (*grpc.ClientConn, error)

InitConn initializes client connection to GRPC server

func JoinGame

func JoinGame(conn *grpc.ClientConn, uuid string)

JoinGame calls to gprc API JoinGame

func Move

func Move(conn *grpc.ClientConn, fromSquare, toSquare string)

Move calls to gprc API move

func RegisterGithubToken

func RegisterGithubToken(token string)

RegisterGithubToken records token on persisted config

func StartGame

func StartGame(conn *grpc.ClientConn, name string, color pb.Color)

StartGame creates a new Game

func Watch

func Watch(conn *grpc.ClientConn, uuid string)

Watch watches a live game, outputs movements to STDOUT

Types

This section is empty.

Jump to

Keyboard shortcuts

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