Documentation ¶
Index ¶
- Variables
- func AddDataSet(did int64, valueType int, value string) (int64, error)
- func AddDataSource(uid int64, valtype int) (int64, error)
- func AddUser(username, password string) (int64, error)
- func AuthUser(username, password string) bool
- func CheckDataSetPermission(uid, did int64) bool
- func DelDataSetViaDid(did int64) error
- func DelDataSource(did int64) error
- func DelUser(uid int64) error
- func ExistDataSet(dsid int64) bool
- func ExistDataSource(did int64) bool
- func ExistUser(username string) bool
- func GetDSIdViaDid(did int64) (int64, error)
- func GetDataSourcesViaUid(uid int64) (*[]DataSource, error)
- func GetUidViaToken(token string) (int64, error)
- func Init()
- func InitTable() int64
- func UpdateDataSetValue(dsid int64, value string) error
- func UpdatePassword(username, password string) error
- func UpdateToken(username, token string) error
- func UpdateUpdatedTimestamp(did int64) error
- type DataSet
- type DataSource
- type SqliteDB
- func (sdb *SqliteDB) Close()
- func (sdb *SqliteDB) Exec(sql string) (sql.Result, error)
- func (sdb *SqliteDB) GetCount(rows *sql.Rows) (int, error)
- func (sdb *SqliteDB) PrepareExec(prepareSql string, args ...interface{}) (sql.Result, error)
- func (sdb *SqliteDB) PrepareQuery(prepareSql string, args ...interface{}) (*sql.Rows, error)
- func (sdb *SqliteDB) Query(sql string) (*sql.Rows, error)
- func (sdb *SqliteDB) Remove()
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var TokenLength int = 64
Functions ¶
func CheckDataSetPermission ¶
func DelDataSetViaDid ¶
func DelDataSource ¶
func ExistDataSet ¶
func ExistDataSource ¶
func GetDSIdViaDid ¶
func GetDataSourcesViaUid ¶
func GetDataSourcesViaUid(uid int64) (*[]DataSource, error)
func GetUidViaToken ¶
func UpdateDataSetValue ¶
func UpdatePassword ¶
func UpdateToken ¶
func UpdateUpdatedTimestamp ¶
Types ¶
type DataSet ¶
type DataSet struct { DSId int64 `json:"dsid"` Did int64 `json:"did"` ValueType int `json:"valtype"` Value string `json:"value"` }
func GetDataSet ¶
type DataSource ¶
type DataSource struct { Did int64 `json:"did"` Uid int64 `json:"uid"` ValueType int `json:"valtype"` CreatedTimestamp int64 `json:"createdTimestamp"` UpdatedTimestamp int64 `json:"updatedTimestamp"` }
func GetDataSource ¶
func GetDataSource(did int64) (*DataSource, error)
Click to show internal directories.
Click to hide internal directories.