operator

package
v0.0.0-...-debbb99 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 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 Operator API CRUD uris

Types

type Operator

type Operator struct {
	FirstName string `protobuf:"bytes,1,opt,name=firstName,json=first_name,proto3" json:"firstName,omitempty"`
	LastName  string `protobuf:"bytes,2,opt,name=lastName,json=last_name,proto3" json:"lastName,omitempty"`
	// Access ID and Access Token will be used for enhanced security,
	//  accessing the operator, etc
	Aid    string `protobuf:"bytes,3,opt,name=aid,json=access_id,proto3" json:"aid,omitempty"`
	Atoken string `protobuf:"bytes,6,opt,name=atoken,json=access_token,proto3" json:"atoken,omitempty"`
	// Unique identifier
	Uid string `protobuf:"bytes,4,opt,name=uid,json=id,proto3" json:"uid,omitempty"`
	// URI to an avatar image, best results it should be 1:1 ratio
	Avatar               string   `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func Create

func Create(id string) *Operator

Create takes an optional Id string and returns a new Operator.

func (*Operator) Descriptor

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

func (*Operator) GetAid

func (m *Operator) GetAid() string

func (*Operator) GetAtoken

func (m *Operator) GetAtoken() string

func (*Operator) GetAvatar

func (m *Operator) GetAvatar() string

func (*Operator) GetFirstName

func (m *Operator) GetFirstName() string

func (*Operator) GetFullName

func (o *Operator) GetFullName() string

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

func (*Operator) GetLastName

func (m *Operator) GetLastName() string

func (*Operator) GetUid

func (m *Operator) GetUid() string

func (Operator) Key

func (o Operator) Key() string

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

func (Operator) MarshalJSON

func (o Operator) MarshalJSON() ([]byte, error)

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

func (*Operator) ProtoMessage

func (*Operator) ProtoMessage()

func (*Operator) Reset

func (m *Operator) Reset()

func (*Operator) String

func (m *Operator) String() string

func (*Operator) UnmarshalJSON

func (o *Operator) UnmarshalJSON(data []byte) error

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

func (*Operator) XXX_DiscardUnknown

func (m *Operator) XXX_DiscardUnknown()

func (*Operator) XXX_Marshal

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

func (*Operator) XXX_Merge

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

func (*Operator) XXX_Size

func (m *Operator) XXX_Size() int

func (*Operator) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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