Documentation ¶
Index ¶
- Constants
- Variables
- func CustomerCreate(accName string) (lastID int64, err error)
- func CustomerDelete(customerID string) error
- func CustomerUpdate(accName, customerID string) error
- func MessageCreate(email, message string) (lastID int64, err error)
- type Application
- type Apps
- type Customer
- type Organization
- type Project
- type Service
- type Shortcut
- type User
Constants ¶
const ( DBHost = "127.0.0.1" DBPort = ":3306" DBUser = "root" DBPass = "root" DBDbase = "oswee" )
const AID = 1
AID is the Account ID
const SID = 1
SID is the Stakeholder ID
const UID = 1
UID is the User ID
Variables ¶
var SelectedPage int
SelectedPage is used to apply active class for curent tab
Functions ¶
func CustomerCreate ¶
CustomerCreate creates a new customer account
func CustomerDelete ¶
CustomerDelete updates customer account record state
func CustomerUpdate ¶
CustomerUpdate updates customer account information
func MessageCreate ¶
MessageCreate function creates a new message in DB
Types ¶
type Application ¶
type Application struct { ID int `json:"ID"` ParentID int `json:"parentID"` Sequence int `json:"sequence"` ShortName string `json:"shortName"` FullName string `json:"fullName"` ShortDescription string `json:"shortDescription"` Visibility int `json:"visibility"` Bcolor string `json:"bcolor"` PrettyTitle string `json:"prettyTitle"` Permalink string `json:"permalink"` IconName string `json:"icon"` Notifications int32 `json:"notifications"` IsNew bool `json:"isNew"` AppState string `json:"appState"` }
Application struct
func GetApplication ¶
func GetApplication(applicationID int) Application
GetApplication function return requested application
func ListApplications ¶
func ListApplications(visibility int) ([]Application, error)
ListApplications is function to retrieve a full list of all users
func ListChildApplications ¶
func ListChildApplications(parentID int) ([]Application, error)
ListChildApplications is function to retrieve a list of all applications based on requested parent
type Apps ¶
type Apps interface { ListApplications(visibility int) ([]Application, error) ListChildApplications(parentID int) ([]Application, error) GetApplication(applicationID int) Application }
Apps interface
type Customer ¶
type Customer struct { ID int `json:"ID"` Name string `json:"name"` CreatedAt string `json:"createdAt"` }
Customer struct
func GetCustomer ¶
GetCustomer function return selected customer object
func ListCustomers ¶
ListCustomers function return list of all customers
type Organization ¶
type Organization struct { ID int `json:"ID"` LegalID int64 `json:"legalID"` Name string `json:"name"` FirstCharacter string `json:"firstCharacter"` PrettyLink string `json:"prettyLink"` Form int `json:"form"` LegalAddress string `json:"legalAddress"` VerificationLevel int `json:"verificationLevel"` Color string `json:"color"` VatRegistrationID string `json:"vatRegistrationID"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` }
Organization struct
func GetOrganization ¶
func GetOrganization(id string) ([]Organization, error)
GetOrganization is a function
func ListOrganizations ¶
func ListOrganizations() ([]Organization, error)
ListOrganizations is function to retrieve a full list of all Organizations
type Project ¶
type Project struct { ID int CustomerID int CustomerName string Name string ServiceID int ServiceTitle string Units float32 Amount float32 Cost float32 Profit float32 CreatedAt string }
Project represents aany kind of project managed in system
func ListCustomerProjects ¶
ListCustomerProjects retrieve list of project
type Service ¶
type Service struct { ID int `json:"ID"` Title string `json:"title"` Description string `json:"description"` UnitPrice float32 `json:"unitPrice"` }
Service struct
func ListServices ¶
ListServices is function to retrieve a full list of all Services
type Shortcut ¶
type Shortcut struct { ID int `json:"ID"` ApplicationID int `json:"applicationID"` Order int `json:"order"` CreatedAt string `json:"createdAt"` Name string `json:"name"` Permalink string `json:"permalink"` Bcolor string `json:"bcolor"` IconName string `json:"iconName"` }
Shortcut are user defined shortcut to favorite apps. Order is contstructed by combining account id and number of shortcut sequence.
func ListShortcuts ¶
ListShortcuts retrieve all current user shortcuts