Documentation ¶
Overview ¶
File taken from docker code base at https://raw.githubusercontent.com/docker/docker/master/pkg/namesgenerator/names-generator.go
Index ¶
- func DefaultConfigPath(app string) string
- func GetRandomName(retry int) string
- func PointToString64(point abstract.Point) (string, error)
- func PointToStringHex(suite abstract.Suite, point abstract.Point) (string, error)
- func Read64Point(suite abstract.Suite, r io.Reader) (abstract.Point, error)
- func Read64Scalar(suite abstract.Suite, r io.Reader) (abstract.Scalar, error)
- func ReadHexPoint(suite abstract.Suite, r io.Reader) (abstract.Point, error)
- func ReadHexScalar(suite abstract.Suite, r io.Reader) (abstract.Scalar, error)
- func ScalarToString64(scalar abstract.Scalar) (string, error)
- func ScalarToStringHex(suite abstract.Suite, scalar abstract.Scalar) (string, error)
- func String64ToPoint(suite abstract.Suite, s string) (abstract.Point, error)
- func String64ToScalar(suite abstract.Suite, str string) (abstract.Scalar, error)
- func StringHexToPoint(suite abstract.Suite, s string) (abstract.Point, error)
- func StringHexToScalar(suite abstract.Suite, str string) (abstract.Scalar, error)
- func Write64Point(suite abstract.Suite, w io.Writer, point abstract.Point) error
- func Write64Scalar(suite abstract.Suite, w io.Writer, scalar abstract.Scalar) error
- func WriteHexPoint(suite abstract.Suite, w io.Writer, point abstract.Point) error
- func WriteHexScalar(suite abstract.Suite, w io.Writer, scalar abstract.Scalar) error
- type Config
- func (c *Config) Dir(folder string) *Config
- func (c *Config) List(match string) []string
- func (c *Config) ListDir() ([]string, error)
- func (c *Config) Path() string
- func (c *Config) Read(fname string, i interface{}) error
- func (c *Config) RelPath(fname string) string
- func (c *Config) Write(fname string, i interface{}) error
- type Tomler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
func GetRandomName ¶
GetRandomName generates a random name from the list of adjectives and surnames in this package formatted as "adjective_surname". For example 'focused_turing'. If retry is non-zero, a random integer between 0 and 10 will be added to the end of the name, e.g `focused_turing3`
func PointToString64 ¶
PointToString64 converts a point to a base64 representation
func PointToStringHex ¶
PointToStringHex converts a point to a hexadecimal representation
func Read64Point ¶
Read64Point reads a point from a base64 representation
func Read64Scalar ¶
Read64Scalar takes a Base64-encoded scalar and returns that scalar, optionally an error
func ReadHexPoint ¶
ReadHexPoint reads a point from a hex representation
func ReadHexScalar ¶
ReadHexScalar takes a hex-encoded scalar and returns that scalar, optionally an error
func ScalarToString64 ¶
ScalarToString64 encodes a scalar to a base64
func ScalarToStringHex ¶
ScalarToStringHex encodes a scalar to hexadecimal
func String64ToPoint ¶
String64ToPoint reads a base64 representation of a point and converts it back to a point.
func String64ToScalar ¶
String64ToScalar reads a scalar in base64 from a string
func StringHexToPoint ¶
StringHexToPoint reads a hexadecimal representation of a point and convert it to the right struct
func StringHexToScalar ¶
StringHexToScalar reads a scalar in hexadecimal from string
func Write64Point ¶
Write64Point writes a point to a base64 representation
func Write64Scalar ¶
Write64Scalar converts a scalar key to a Base64-string
func WriteHexPoint ¶
WriteHexPoint writes a point to a hex representation
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}