Versions in this module Expand all Collapse all v0 v0.3.1 Feb 23, 2018 Changes in this version + func OpenMySql(user, pass, host string, port uint, dbname string) (*sql.DB, error) + type PrivateKeys struct + func NewPrivateKeys(db *sql.DB) *PrivateKeys + func (t *PrivateKeys) Commit() error + func (t *PrivateKeys) Delete(u *PrivateKeysRecord) (int64, error) + func (t *PrivateKeys) GetByData(Data string) ([]*PrivateKeysRecord, error) + func (t *PrivateKeys) GetByGmtCreate(GmtCreate time.Time) ([]*PrivateKeysRecord, error) + func (t *PrivateKeys) GetByGmtModified(GmtModified time.Time) ([]*PrivateKeysRecord, error) + func (t *PrivateKeys) GetById(Id int64) ([]*PrivateKeysRecord, error) + func (t *PrivateKeys) GetByName(Name string) ([]*PrivateKeysRecord, error) + func (t *PrivateKeys) GetByType(Type string) ([]*PrivateKeysRecord, error) + func (t *PrivateKeys) GetFirstByData(Data string) (*PrivateKeysRecord, error) + func (t *PrivateKeys) GetFirstByGmtCreate(GmtCreate time.Time) (*PrivateKeysRecord, error) + func (t *PrivateKeys) GetFirstByGmtModified(GmtModified time.Time) (*PrivateKeysRecord, error) + func (t *PrivateKeys) GetFirstById(Id int64) (*PrivateKeysRecord, error) + func (t *PrivateKeys) GetFirstByName(Name string) (*PrivateKeysRecord, error) + func (t *PrivateKeys) GetFirstByType(Type string) (*PrivateKeysRecord, error) + func (t *PrivateKeys) Post(u *PrivateKeysRecord) (int64, error) + func (t *PrivateKeys) Put(u *PrivateKeysRecord) (int64, error) + func (t *PrivateKeys) Rollback() error + type PrivateKeysRecord struct + Data string + GmtCreate time.Time + GmtModified time.Time + Id int64 + Name string + Type string + type PubkeyPrikeyMap struct + func NewPubkeyPrikeyMap(db *sql.DB) *PubkeyPrikeyMap + func (t *PubkeyPrikeyMap) Commit() error + func (t *PubkeyPrikeyMap) Delete(u *PubkeyPrikeyMapRecord) (int64, error) + func (t *PubkeyPrikeyMap) GetByGmtCreate(GmtCreate time.Time) ([]*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetByGmtModified(GmtModified time.Time) ([]*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetById(Id int64) ([]*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetByPrivateKeyId(PrivateKeyId int64) ([]*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetByPubkeyId(PubkeyId int64) ([]*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetFirstByGmtCreate(GmtCreate time.Time) (*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetFirstByGmtModified(GmtModified time.Time) (*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetFirstById(Id int64) (*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetFirstByPrivateKeyId(PrivateKeyId int64) (*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) GetFirstByPubkeyId(PubkeyId int64) (*PubkeyPrikeyMapRecord, error) + func (t *PubkeyPrikeyMap) Post(u *PubkeyPrikeyMapRecord) (int64, error) + func (t *PubkeyPrikeyMap) Put(u *PubkeyPrikeyMapRecord) (int64, error) + func (t *PubkeyPrikeyMap) Rollback() error + type PubkeyPrikeyMapRecord struct + GmtCreate time.Time + GmtModified time.Time + Id int64 + PrivateKeyId int64 + PubkeyId int64 + type PubkeyUpstreamMap struct + func NewPubkeyUpstreamMap(db *sql.DB) *PubkeyUpstreamMap + func (t *PubkeyUpstreamMap) Commit() error + func (t *PubkeyUpstreamMap) Delete(u *PubkeyUpstreamMapRecord) (int64, error) + func (t *PubkeyUpstreamMap) GetByGmtCreate(GmtCreate time.Time) ([]*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetByGmtModified(GmtModified time.Time) ([]*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetById(Id int64) ([]*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetByPubkeyId(PubkeyId int64) ([]*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetByUpstreamId(UpstreamId int64) ([]*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetFirstByGmtCreate(GmtCreate time.Time) (*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetFirstByGmtModified(GmtModified time.Time) (*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetFirstById(Id int64) (*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetFirstByPubkeyId(PubkeyId int64) (*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) GetFirstByUpstreamId(UpstreamId int64) (*PubkeyUpstreamMapRecord, error) + func (t *PubkeyUpstreamMap) Post(u *PubkeyUpstreamMapRecord) (int64, error) + func (t *PubkeyUpstreamMap) Put(u *PubkeyUpstreamMapRecord) (int64, error) + func (t *PubkeyUpstreamMap) Rollback() error + type PubkeyUpstreamMapRecord struct + GmtCreate time.Time + GmtModified time.Time + Id int64 + PubkeyId int64 + UpstreamId int64 + type PublicKeys struct + func NewPublicKeys(db *sql.DB) *PublicKeys + func (t *PublicKeys) Commit() error + func (t *PublicKeys) Delete(u *PublicKeysRecord) (int64, error) + func (t *PublicKeys) GetByData(Data string) ([]*PublicKeysRecord, error) + func (t *PublicKeys) GetByGmtCreate(GmtCreate time.Time) ([]*PublicKeysRecord, error) + func (t *PublicKeys) GetByGmtModified(GmtModified time.Time) ([]*PublicKeysRecord, error) + func (t *PublicKeys) GetById(Id int64) ([]*PublicKeysRecord, error) + func (t *PublicKeys) GetByName(Name string) ([]*PublicKeysRecord, error) + func (t *PublicKeys) GetByType(Type string) ([]*PublicKeysRecord, error) + func (t *PublicKeys) GetFirstByData(Data string) (*PublicKeysRecord, error) + func (t *PublicKeys) GetFirstByGmtCreate(GmtCreate time.Time) (*PublicKeysRecord, error) + func (t *PublicKeys) GetFirstByGmtModified(GmtModified time.Time) (*PublicKeysRecord, error) + func (t *PublicKeys) GetFirstById(Id int64) (*PublicKeysRecord, error) + func (t *PublicKeys) GetFirstByName(Name string) (*PublicKeysRecord, error) + func (t *PublicKeys) GetFirstByType(Type string) (*PublicKeysRecord, error) + func (t *PublicKeys) Post(u *PublicKeysRecord) (int64, error) + func (t *PublicKeys) Put(u *PublicKeysRecord) (int64, error) + func (t *PublicKeys) Rollback() error + type PublicKeysRecord struct + Data string + GmtCreate time.Time + GmtModified time.Time + Id int64 + Name string + Type string + type Server struct + func NewServer(db *sql.DB) *Server + func (t *Server) Commit() error + func (t *Server) Delete(u *ServerRecord) (int64, error) + func (t *Server) GetByAddress(Address string) ([]*ServerRecord, error) + func (t *Server) GetByGmtCreate(GmtCreate time.Time) ([]*ServerRecord, error) + func (t *Server) GetByGmtModified(GmtModified time.Time) ([]*ServerRecord, error) + func (t *Server) GetById(Id int64) ([]*ServerRecord, error) + func (t *Server) GetByName(Name string) ([]*ServerRecord, error) + func (t *Server) GetFirstByAddress(Address string) (*ServerRecord, error) + func (t *Server) GetFirstByGmtCreate(GmtCreate time.Time) (*ServerRecord, error) + func (t *Server) GetFirstByGmtModified(GmtModified time.Time) (*ServerRecord, error) + func (t *Server) GetFirstById(Id int64) (*ServerRecord, error) + func (t *Server) GetFirstByName(Name string) (*ServerRecord, error) + func (t *Server) Post(u *ServerRecord) (int64, error) + func (t *Server) Put(u *ServerRecord) (int64, error) + func (t *Server) Rollback() error + type ServerRecord struct + Address string + GmtCreate time.Time + GmtModified time.Time + Id int64 + Name string + type Upstream struct + func NewUpstream(db *sql.DB) *Upstream + func (t *Upstream) Commit() error + func (t *Upstream) Delete(u *UpstreamRecord) (int64, error) + func (t *Upstream) GetByGmtCreate(GmtCreate time.Time) ([]*UpstreamRecord, error) + func (t *Upstream) GetByGmtModified(GmtModified time.Time) ([]*UpstreamRecord, error) + func (t *Upstream) GetById(Id int64) ([]*UpstreamRecord, error) + func (t *Upstream) GetByName(Name string) ([]*UpstreamRecord, error) + func (t *Upstream) GetByPrivateKeyId(PrivateKeyId int64) ([]*UpstreamRecord, error) + func (t *Upstream) GetByServerId(ServerId int64) ([]*UpstreamRecord, error) + func (t *Upstream) GetByUsername(Username string) ([]*UpstreamRecord, error) + func (t *Upstream) GetFirstByGmtCreate(GmtCreate time.Time) (*UpstreamRecord, error) + func (t *Upstream) GetFirstByGmtModified(GmtModified time.Time) (*UpstreamRecord, error) + func (t *Upstream) GetFirstById(Id int64) (*UpstreamRecord, error) + func (t *Upstream) GetFirstByName(Name string) (*UpstreamRecord, error) + func (t *Upstream) GetFirstByPrivateKeyId(PrivateKeyId int64) (*UpstreamRecord, error) + func (t *Upstream) GetFirstByServerId(ServerId int64) (*UpstreamRecord, error) + func (t *Upstream) GetFirstByUsername(Username string) (*UpstreamRecord, error) + func (t *Upstream) Post(u *UpstreamRecord) (int64, error) + func (t *Upstream) Put(u *UpstreamRecord) (int64, error) + func (t *Upstream) Rollback() error + type UpstreamRecord struct + GmtCreate time.Time + GmtModified time.Time + Id int64 + Name string + PrivateKeyId int64 + ServerId int64 + Username string + type UserUpstreamMap struct + func NewUserUpstreamMap(db *sql.DB) *UserUpstreamMap + func (t *UserUpstreamMap) Commit() error + func (t *UserUpstreamMap) Delete(u *UserUpstreamMapRecord) (int64, error) + func (t *UserUpstreamMap) GetByGmtCreate(GmtCreate time.Time) ([]*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetByGmtModified(GmtModified time.Time) ([]*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetById(Id int64) ([]*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetByUpstreamId(UpstreamId int64) ([]*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetByUsername(Username string) ([]*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetFirstByGmtCreate(GmtCreate time.Time) (*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetFirstByGmtModified(GmtModified time.Time) (*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetFirstById(Id int64) (*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetFirstByUpstreamId(UpstreamId int64) (*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) GetFirstByUsername(Username string) (*UserUpstreamMapRecord, error) + func (t *UserUpstreamMap) Post(u *UserUpstreamMapRecord) (int64, error) + func (t *UserUpstreamMap) Put(u *UserUpstreamMapRecord) (int64, error) + func (t *UserUpstreamMap) Rollback() error + type UserUpstreamMapRecord struct + GmtCreate time.Time + GmtModified time.Time + Id int64 + UpstreamId int64 + Username string