Documentation ¶
Index ¶
- type ActionKind
- type FieldKind
- type FieldSource
- type Srv
- func (srv *Srv) Add() (err error)
- func (srv *Srv) Count() (total int, err error)
- func (srv *Srv) Db() (db string)
- func (srv *Srv) Delete() (err error)
- func (srv *Srv) Get() (srvRet *Srv, err error)
- func (srv *Srv) GetByName() (srvRet *Srv, err error)
- func (srv *Srv) GetC() (c *mgo.Collection)
- func (srv *Srv) List(offset, limit int) (srvs []*Srv, err error)
- func (srv *Srv) ParseFromRequest(r *http.Request) (err error)
- func (srv *Srv) Regular() (ok bool)
- func (srv *Srv) Table() (table string)
- func (srv *Srv) Update() (err error)
- type SrvAction
- type SrvActionField
- type SrvField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionKind ¶
type ActionKind int
const ( ActionKindNone ActionKind = iota ActionKindList ActionKindUpdate ActionKindDelete ActionKindCustomer ActionKindTransparent )
type FieldSource ¶
type FieldSource int
const ( FieldSourceNone FieldSource = iota FieldSourceUser FieldSourceArray FieldSourceUrl )
type Srv ¶
type Srv struct { ID int64 `json:"id" bson:"_id"` MName string `json:"m_name" bson:"m_name"` SName string `json:"s_name" bson:"s_name"` Desc string `json:"desc" bisn:"desc"` Addr string `json:"addr" bson:"addr"` ActionFields []*SrvActionField `json:"action_fields" bson:"action_fields"` Ct time.Time `json:"ct" bson:"ct"` Ut time.Time `json:"ut" bson:"ut"` }
func (*Srv) GetC ¶
func (srv *Srv) GetC() (c *mgo.Collection)
type SrvAction ¶
type SrvAction struct { Path string `json:"path" bson:"path"` Desc string `json:"desc" bson:"desc"` Kind ActionKind `json:"kind" bson:"kind"` }
type SrvActionField ¶
type SrvActionField struct { Action *SrvAction `json:"action" bson:"action"` Fields []*SrvField `json:"fields" bson:"fields"` }
func (*SrvActionField) Regular ¶
func (srvActionField *SrvActionField) Regular() (ok bool)
Click to show internal directories.
Click to hide internal directories.