Documentation
¶
Index ¶
- func AppUrl() string
- func Id() uint64
- func UniqueId() (uint64, error)
- type Context
- type FileDef
- type ID
- type KV
- func (j KV) Any(key string) (any, bool)
- func (j KV) Float64(key string) (float64, bool)
- func (j KV) Float64Value() (float64, bool)
- func (j KV) Int64(key string) (int64, bool)
- func (j KV) Int64Value() (int64, bool)
- func (j KV) List(key string) ([]any, bool)
- func (j KV) Map(key string) (map[string]interface{}, bool)
- func (j KV) Merge(kvs ...KV) KV
- func (j *KV) Scan(value interface{}) error
- func (j KV) String(key string) (string, bool)
- func (j KV) StringValue() (string, bool)
- func (j KV) Uint64(key string) (uint64, bool)
- func (j KV) Uint64Value() (uint64, bool)
- func (j KV) Value() (driver.Value, error)
- type ObjHeader
- type Uid
- type UserLoginRequest
- type UserLoginResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct {
// Sender's UserId as string.
AsUser Uid
// contains filtered or unexported fields
}
func (*Context) Cancel ¶
func (c *Context) Cancel() context.CancelFunc
func (*Context) SetTimeout ¶
type FileDef ¶
type FileDef struct {
ObjHeader `bson:",inline"`
// Name of the file
Name string
// Status of upload
Status int
// User who created the file
User string
// Type of the file.
MimeType string
// Size of the file in bytes.
Size int64
// Internal file location, i.e. path on disk or an S3 blob address.
Location string
}
FileDef is a stored record of a file upload
type KV ¶
type KV map[string]interface{}
func (KV) Float64Value ¶
func (KV) Int64Value ¶
func (KV) StringValue ¶
func (KV) Uint64Value ¶
type ObjHeader ¶
type ObjHeader struct {
// using string to get around rethinkdb's problems with uint64;
// `bson:"_id"` tag is for mongodb to use as primary key '_id'.
Id string `bson:"_id"`
//id Uid
CreatedAt time.Time
UpdatedAt time.Time
}
ObjHeader is the header shared by all stored objects.
type Uid ¶
type Uid string
Uid is a database-specific record id, suitable to be used as a primary key.
const ZeroUid Uid = ""
ZeroUid is a constant representing uninitialized Uid.
type UserLoginRequest ¶
type UserLoginResponse ¶
Click to show internal directories.
Click to hide internal directories.