Documentation
¶
Index ¶
Constants ¶
View Source
const (
AddGroupQuery = `
INSERT INTO users_group
(user_id, group_id)
VALUES
(:userID, :groupID);
`
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct { Id uint64 `db:"id"` Title string `json:"title" db:"title"` Description string `json:"description" db:"description"` Start_date time.Time `json:"start_date" db:"start_date"` End_date time.Time `json:"end_date" db:"end_date"` OwnerID uint64 `json:"owner" db:"owner"` ImageID uint64 `json:"image" db:"image"` }
func GetCurrentEvents ¶
func GetPastEvents ¶
func GetUpcomingEvents ¶
type File ¶
type File struct { Id uint64 `json:"-" db:"id"` Permission uint32 `json:"-" db:"permission"` // 0 is public, 1 is private OwnerID uint64 `json:"owner" db:"owner_id"` GroupID uint64 `json:"-" db:"group_id"` // TODO: Could be many groups EquipmentID uint64 `json:"-" db:"equipment_id"` // file path is ./files/$(file_hash)$(file_name) Filename string `json:"filename" db:"file_name"` Filehash []byte `json:"-" db:"file_hash"` }
func GetFileByHash ¶
func GetFileById ¶
func GetUserFiles ¶
type Inventory ¶
type Inventory struct { Id uint64 `db:"id"` GroupID uint64 `json:"groupId" db:"group_id"` Name string `json:"name" db:"name"` Amount uint64 `json:"amount" db:"amount"` }
func GetInventories ¶
type Participant ¶
type Participant struct { Id uint64 `db:"id"` EventID uint64 `json:"eventId" db:"event_id"` UserID uint64 `json:"userId" db:"user_id"` }
func (*Participant) Insert ¶
func (p *Participant) Insert() error
Click to show internal directories.
Click to hide internal directories.