shared

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SessionInfoParser

func SessionInfoParser(data map[string]interface{}) webwire.SessionInfo

SessionInfoParser parses the given session info data into a webwire.SessionInfo compliant object specific to this application

Types

type AuthenticationCredentials

type AuthenticationCredentials struct {
	Name     string `json:"name"`
	Password string `json:"pass"`
}

AuthenticationCredentials represents the credentials of a user

type ChatMessage

type ChatMessage struct {
	User string `json:"user"`
	Msg  string `json:"msg"`
}

ChatMessage represents a chat message containing the senders name

type SessionInfo

type SessionInfo struct {
	Username string
}

SessionInfo implements the webwire.SessionInfo interface for this particular example

func (*SessionInfo) Copy

func (sinf *SessionInfo) Copy() webwire.SessionInfo

Copy implements the webwire.SessionInfo interface. It deep-copies the object and returns it's exact clone

func (*SessionInfo) Fields

func (sinf *SessionInfo) Fields() []string

Fields implements the webwire.SessionInfo interface. It returns a constant list of the names of all fields of the object

func (*SessionInfo) Value

func (sinf *SessionInfo) Value(fieldName string) interface{}

Value implements the webwire.SessionInfo interface. It returns an exact deep copy of a session info field value

Jump to

Keyboard shortcuts

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