Documentation ¶
Overview ¶
Package models is a generated protocol buffer package.
It is generated from these files:
user.proto
It has these top-level messages:
User
Index ¶
- Variables
- func RecycleErrResponse(errResponse *ErrResponse)
- func RecycleMedia(media *Media)
- func RecycleMediaList(mediaList *MediaList)
- func RecycleSuccessResponse(successResponse *SuccessResponse)
- type AppConfig
- type CacheConfig
- type Config
- type DatabaseConfig
- type ErrResponse
- type Media
- type MediaList
- type ServerConfig
- type SuccessResponse
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (this *User) Equal(that interface{}) bool
- func (m *User) GetEmail() string
- func (m *User) GetFirstName() string
- func (m *User) GetHash() []byte
- func (m *User) GetLastName() string
- func (this *User) GoString() string
- func (m *User) Marshal() (dAtA []byte, err error)
- func (m *User) MarshalTo(dAtA []byte) (int, error)
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) Size() (n int)
- func (this *User) String() string
- func (m *User) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthUser = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowUser = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RecycleErrResponse ¶
func RecycleErrResponse(errResponse *ErrResponse)
RecycleErrResponse puts back ErrResponse struct back into sync pool
func RecycleMedia ¶
func RecycleMedia(media *Media)
RecycleMedia puts back Media struct back into sync pool
func RecycleMediaList ¶
func RecycleMediaList(mediaList *MediaList)
RecycleMediaList puts back MediaList struct back into sync pool
func RecycleSuccessResponse ¶
func RecycleSuccessResponse(successResponse *SuccessResponse)
RecycleSuccessResponse puts back SuccessResponse struct back into sync pool
Types ¶
type AppConfig ¶
type AppConfig struct { Paths []string // directories to load media from UserExpiry int `toml:"user_expiry"` }
AppConfig holds application-specific configurations
type CacheConfig ¶
CacheConfig holds redis cache configuration
type Config ¶
type Config struct { Server ServerConfig Database DatabaseConfig Cache CacheConfig App AppConfig }
Config is configuration loaded from toml
type DatabaseConfig ¶
DatabaseConfig holds database-specific configurations
type ErrResponse ¶
ErrResponse is json response message for all server errors
func GetErrResponse ¶
func GetErrResponse() *ErrResponse
GetErrResponse gets ErrResponse struct from sync pool
func (ErrResponse) MarshalEasyJSON ¶
func (v ErrResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ErrResponse) MarshalJSON ¶
func (v ErrResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ErrResponse) UnmarshalEasyJSON ¶
func (v *ErrResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ErrResponse) UnmarshalJSON ¶
func (v *ErrResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Media ¶
type Media struct { Path string `json:"path" bson:"_id"` Category string `json:"category"` Subtitle string `json:"subtitle"` Name string `json:"name"` Mimetype string `json:"mimetype"` Extension string `json:"extension"` Size int64 `json:"size"` Access []string `json:"access,omitempty"` Added time.Time `json:"added"` }
Media -
func (Media) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Media) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Media) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Media) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type MediaList ¶
MediaList -
func GetMediaList ¶
func GetMediaList() *MediaList
GetMediaList gets MediaList struct from sync pool
func (MediaList) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (MediaList) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*MediaList) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*MediaList) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type ServerConfig ¶
ServerConfig holds server-specific configurations
type SuccessResponse ¶
type SuccessResponse struct {
Msg string
}
SuccessResponse is json response message for successful execution
func GetSuccessResponse ¶
func GetSuccessResponse() *SuccessResponse
GetSuccessResponse gets SuccessResponse struct from sync pool
func (SuccessResponse) MarshalEasyJSON ¶
func (v SuccessResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SuccessResponse) MarshalJSON ¶
func (v SuccessResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SuccessResponse) UnmarshalEasyJSON ¶
func (v *SuccessResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SuccessResponse) UnmarshalJSON ¶
func (v *SuccessResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type User ¶
type User struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty" bson:"_id"` FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` }
func (*User) Descriptor ¶
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()