character

package
v0.0.0-...-af9f937 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2019 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

provides a simple type for representing characters who may be used throughout the application as narrarators.

Characters have a name and a URL to an avatar image.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Character

type Character struct {
	// contains filtered or unexported fields
}

func NewCharacter

func NewCharacter(name string, avatarUrl string) Character

creates a new character with a randomized id

func (Character) AvatarUrl

func (c Character) AvatarUrl() string

gets the Avatar URL

func (Character) Id

func (c Character) Id() int64

gets the Id

func (Character) MarshalJSON

func (c Character) MarshalJSON() ([]byte, error)

JSON marshals to {id:int, name:string, avatarURL:string}

func (Character) Name

func (c Character) Name() string

gets the Name

type Characters

type Characters []Character

Jump to

Keyboard shortcuts

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