Documentation ¶
Overview ¶
todo: generate models through scaffolds
todo: generate models through scaffolds
Index ¶
- func FetchBatches(user_id gocql.UUID, limit int) *[]map[string]interface{}
- func FetchLogs(batch_id gocql.UUID, page gocql.UUID, order_by string, limit int) *[]map[string]interface{}
- func GetWeekStats(user_id gocql.UUID) *[]map[string]interface{}
- type Batch
- func (b *Batch) Create(data map[string]interface{}) (bool, error)
- func (b *Batch) Exists() (bool, error)
- func (b *Batch) GetId() string
- func (b *Batch) GetMap() map[string]interface{}
- func (b *Batch) Populate(data map[string]interface{}) *Batch
- func (b *Batch) Update(data map[string]interface{}) (bool, error)
- type GithubUser
- type Log
- type Stat
- type User
- func (u *User) Create(data map[string]interface{}) (bool, error)
- func (u *User) Exists() (bool, error)
- func (u *User) GetId() string
- func (u *User) GetUUID() gocql.UUID
- func (u *User) New() *User
- func (u *User) Populate(data map[string]interface{}) *User
- func (u *User) Update(data map[string]interface{}) (bool, error)
- type UserRedis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchBatches ¶
Retrieves batches associated to a user
func FetchLogs ¶
func FetchLogs(batch_id gocql.UUID, page gocql.UUID, order_by string, limit int) *[]map[string]interface{}
Fetch array of logs
func GetWeekStats ¶
Returns stats of a week
Types ¶
type Batch ¶
type Batch struct { Batch_id gocql.UUID User_id gocql.UUID Status string Options map[string]string Created_at time.Time // contains filtered or unexported fields }
type GithubUser ¶
type GithubUser struct { UUID string `json:uuid` Avatar_Url string `json:avatar_url` Name string `json:name` Company string `json:company` Location string `json:location` Email string `json:email` Access_Token string `json:access_token` Api_key string `json:api_key` }
these data points can be extended further that's why kept seperate from UserRedis struct
type Log ¶
type Log struct { Log_id gocql.UUID Batch_id gocql.UUID User_id gocql.UUID // Client_key string // todo: make use of client_id Email string State string Status map[string]bool // a map of service providers state LastUpdate time.Time Created_at time.Time }
type User ¶
type User struct { User_Id gocql.UUID Email string Name string Api_Key string // Client_id string : todo: add a client id and let user have multi api_keys Location string User_Type int Auth_Token string Company string Created_at time.Time }
Click to show internal directories.
Click to hide internal directories.