internal

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package internal defines common functions used by both rock paper scissors clients and servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateName

func CreateName(ctx *context.T) string

CreateName creates a name using the username and hostname.

func FindJudge

func FindJudge(ctx *context.T, prefix string) (string, error)

FindJudge returns a random rock-paper-scissors judge from the mount table.

func FindPlayer

func FindPlayer(ctx *context.T, prefix string) (string, error)

FindPlayer returns a random rock-paper-scissors player from the mount table.

func FindScoreKeepers

func FindScoreKeepers(ctx *context.T, prefix string) ([]string, error)

FindScoreKeepers returns all the rock-paper-scissors score keepers from the mount table.

func FormatScoreCard

func FormatScoreCard(score rps.ScoreCard) string

FormatScoreCard returns a string representation of a score card.

func NewAuthorizer

func NewAuthorizer(fname string) security.Authorizer

Types

This section is empty.

Jump to

Keyboard shortcuts

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