client

package
v0.2.1-0...-f8427a7 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG   string = "DEBUG"
	INFO    string = "INFO"
	WARNING string = "WARN"
	ERROR   string = "ERROR"
	FATAL   string = "FATAL"
)

Log levels

Variables

This section is empty.

Functions

func Routes

func Routes(router *httprouter.Router, ds *store.InMemory)

Routes defines the Client API routes

Types

type Client

type Client struct {
	FirstName            string   `protobuf:"bytes,1,opt,name=first_name,proto3" json:"first_name,omitempty"`
	LastName             string   `protobuf:"bytes,2,opt,name=last_name,proto3" json:"last_name,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Uid                  string   `protobuf:"bytes,4,opt,name=uid,json=id,proto3" json:"uid,omitempty"`
	Sid                  string   `protobuf:"bytes,5,opt,name=sid,proto3" json:"sid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func Create

func Create(sid string) *Client

Create takes a Sid identifier string and returns a new Client.

func (*Client) Descriptor

func (*Client) Descriptor() ([]byte, []int)

func (*Client) GetFirstName

func (m *Client) GetFirstName() string

func (*Client) GetFullName

func (c *Client) GetFullName() string

GetFullName returns the Client FirstName and LastName concatenated by a space. Implementing the Client as a Person.

func (*Client) GetLastName

func (m *Client) GetLastName() string

func (*Client) GetName

func (m *Client) GetName() string

func (*Client) GetSid

func (m *Client) GetSid() string

func (*Client) GetUid

func (m *Client) GetUid() string

func (Client) Key

func (c Client) Key() string

Key implements the Keyer interface of the Store and returns a string used for storing the Client in memory.

func (Client) MarshalJSON

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

MarshalJSON converts a Client object into a JSON string returned as a byte array.

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) Reset

func (m *Client) Reset()

func (*Client) String

func (m *Client) String() string

func (*Client) UnmarshalJSON

func (c *Client) UnmarshalJSON(data []byte) error

UnmarshalJSON converts a JSON string (as a byte array) into a Client object.

func (*Client) XXX_DiscardUnknown

func (m *Client) XXX_DiscardUnknown()

func (*Client) XXX_Marshal

func (m *Client) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Client) XXX_Merge

func (dst *Client) XXX_Merge(src proto.Message)

func (*Client) XXX_Size

func (m *Client) XXX_Size() int

func (*Client) XXX_Unmarshal

func (m *Client) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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