Documentation ¶
Index ¶
- func AddCategory(category *models.Category) error
- func AddContributionToContributions(contributions []*models.Contribution, contribution *models.Contribution) []*models.Contribution
- func AddInspectorToRequest(request *models.Request, auth *bind.TransactOpts) error
- func AddJournalEntry(journalEntry *models.JournalEntry) error
- func AddLacksToRequest(inspection *models.Inspection, auth *bind.TransactOpts) error
- func CheckLoginWithEmail(_email string, _password string) (models.User, error)
- func CheckLoginWithUsername(_username string, _password string) (models.User, error)
- func CheckRausJournal(request *models.Request) error
- func CountContributions() (int64, error)
- func CountControlCategories() (int64, error)
- func CountControlPoints() (int64, error)
- func CountLacks() (int64, error)
- func CountLegalForms() (int64, error)
- func CountPlantTypes() (int64, error)
- func CountPointGroups() (int64, error)
- func CountRoles() (int64, error)
- func CountUsers() (int64, error)
- func CreateContribution(c *models.Contribution) error
- func CreateControlCategory(cc *models.ControlCategory) error
- func CreateControlPoint(cp *models.ControlPoint) error
- func CreateLack(l *models.Lack) error
- func CreateLegalForm(lf *models.LegalForm) error
- func CreateMultiLacks(lacks []models.Lack) error
- func CreatePlant(r *models.Plant) error
- func CreatePlantType(pt *models.PlantType) error
- func CreatePointGroup(pc *models.PointGroup) error
- func CreateRequest(request *models.Request, auth *bind.TransactOpts) error
- func CreateRole(r *models.Role) error
- func CreateUser(u *models.User) error
- func GetAllContributions() []*models.Contribution
- func GetAllControlCategories() []*models.ControlCategory
- func GetAllControlPoints() []*models.ControlPoint
- func GetAllLacks() []*models.Lack
- func GetAllLegalForms() []*models.LegalForm
- func GetAllPlantTypes() []*models.PlantType
- func GetAllPointGroupByCode(_code uint16) (*models.PointGroup, error)
- func GetAllPointGroupById(_id int64) (*models.PointGroup, error)
- func GetAllPointGroups() []*models.PointGroup
- func GetAllRequests() []*models.Request
- func GetAllRequestsByUserId(userId int64) []*models.Request
- func GetAllRequestsForInspection() []*models.Request
- func GetAllRequestsForInspectionByInspectorId(inspectorId int64) []*models.Request
- func GetAllUsers() []*models.User
- func GetAllUsersByRole(_role string) ([]*models.User, error)
- func GetBalanceOf(address common.Address) (*big.Int, error)
- func GetCategories(userTvd int32) ([]*models.Category, error)
- func GetContributionByCode(_code uint16) (*models.Contribution, error)
- func GetContributionById(_id int64) (*models.Contribution, error)
- func GetContributionByInspectionLack(iL *models.InspectionLack) *models.Contribution
- func GetCowFromUser(userTvd int32) ([]*models.Cow, error)
- func GetFirstPaymentAmount(request *models.Request) (*big.Int, error)
- func GetJournal(tvd string) (*models.Journal, error)
- func GetMonthlyStats(userTvd int32, month uint8, year uint16) (models.MonthlyStats, error)
- func GetRequestAddressById(requestId int64) string
- func GetRequestById(requestId int64, smartContract bool) *models.Request
- func GetRequestIdByAddress(requestAddress string) int64
- func GetSecondPaymentAmount(request *models.Request) (*big.Int, error)
- func GetTransactionForRequest(requestAddress string) []*models.APaymentTokenTransaction
- func GetTransactions() ([]*models.APaymentTokenTransaction, error)
- func GetUserByAddress(etherumAddress string) (*models.User, error)
- func GetUserById(_id int64) (*models.User, error)
- func GetUserByUsername(_username string) (*models.User, error)
- func IsCategoryExisting(name string, is_default bool) bool
- func IssueToken(user *models.User) map[string]string
- func ParseToken(signedTokenWithBearer string) (models.Claim, error)
- func Transfer(aPaymentTokenTransfer *models.APaymentTokenTransfer, requestAddress string) error
- func Validate(signedTokenWithBearer string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCategory ¶
func AddContributionToContributions ¶
func AddContributionToContributions(contributions []*models.Contribution, contribution *models.Contribution) []*models.Contribution
Function adds a Contribution to a slice of contributions if contribution does not exist yet in the slice, if contribution exist, it checks if the contribution alreayd contains the ControlCategory and so on...
func AddInspectorToRequest ¶
func AddInspectorToRequest(request *models.Request, auth *bind.TransactOpts) error
func AddJournalEntry ¶
func AddJournalEntry(journalEntry *models.JournalEntry) error
func AddLacksToRequest ¶
func AddLacksToRequest(inspection *models.Inspection, auth *bind.TransactOpts) error
Add inspection Lacks to Request
func CheckLoginWithEmail ¶
func CheckLoginWithUsername ¶
func CheckRausJournal ¶
func CountContributions ¶
func CountControlCategories ¶
func CountControlPoints ¶
func CountLacks ¶
func CountLegalForms ¶
func CountPlantTypes ¶
func CountPointGroups ¶
func CountRoles ¶
func CountUsers ¶
func CreateContribution ¶
func CreateContribution(c *models.Contribution) error
func CreateControlCategory ¶
func CreateControlCategory(cc *models.ControlCategory) error
func CreateControlPoint ¶
func CreateControlPoint(cp *models.ControlPoint) error
func CreateLack ¶
func CreateLegalForm ¶
func CreateMultiLacks ¶
func CreatePlant ¶
func CreatePlantType ¶
func CreatePointGroup ¶
func CreatePointGroup(pc *models.PointGroup) error
func CreateRequest ¶
func CreateRequest(request *models.Request, auth *bind.TransactOpts) error
CreateRequest deploys a new Request Contract in the blockchain.
func CreateRole ¶
func CreateUser ¶
func GetAllContributions ¶
func GetAllContributions() []*models.Contribution
func GetAllControlCategories ¶
func GetAllControlCategories() []*models.ControlCategory
func GetAllControlPoints ¶
func GetAllControlPoints() []*models.ControlPoint
func GetAllLacks ¶
func GetAllLegalForms ¶
func GetAllPlantTypes ¶
func GetAllPointGroupByCode ¶
func GetAllPointGroupByCode(_code uint16) (*models.PointGroup, error)
func GetAllPointGroupById ¶
func GetAllPointGroupById(_id int64) (*models.PointGroup, error)
func GetAllPointGroups ¶
func GetAllPointGroups() []*models.PointGroup
func GetAllRequests ¶
GetAllRequests loads all request address stored in the database. With the address, the contract of the request get loaded.
func GetAllRequestsByUserId ¶
func GetAllUsers ¶
func GetContributionByCode ¶
func GetContributionByCode(_code uint16) (*models.Contribution, error)
func GetContributionById ¶
func GetContributionById(_id int64) (*models.Contribution, error)
func GetContributionByInspectionLack ¶
func GetContributionByInspectionLack(iL *models.InspectionLack) *models.Contribution
func GetMonthlyStats ¶
func GetRequestAddressById ¶
func GetRequestIdByAddress ¶
func GetSecondPaymentAmount ¶
func GetTransactionForRequest ¶
func GetTransactionForRequest(requestAddress string) []*models.APaymentTokenTransaction
func GetTransactions ¶
func GetTransactions() ([]*models.APaymentTokenTransaction, error)
func IsCategoryExisting ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.