Documentation
¶
Index ¶
- Constants
- Variables
- type AccountValueMode
- type BalanceUnit
- type BaseModel
- type BillingAccountType
- type BillingMode
- type CreditSource
- type InvoiceStatus
- type JSONTime
- type MeterEventType
- type NegativeStatus
- type Permission
- type PrepaidDebitReason
- type RateType
- type StringArray
- type TicketStatus
- type TransactionStatus
- type TransactionType
- type UserRole
- type UtilityType
Constants ¶
View Source
const ( BillingTypeWater BillingAccountType = "water" BillingTypePower BillingAccountType = "power" BillingModePrepaid BillingMode = "prepaid" BillingModePostpaid BillingMode = "postpaid" BalanceUnitKES BalanceUnit = "KES" BalanceUnitKWH BalanceUnit = "kWh" BalanceUnitLitres BalanceUnit = "litres" ValueModeWallet AccountValueMode = "wallet" ValueModeToken AccountValueMode = "token" )
Variables ¶
View Source
var RolePermissions = map[string][]Permission{ "admin": { PermCreateAccount, PermViewAccount, PermEditAccount, PermCreateTenant, PermViewTenant, PermReadMeter, PermUpdateMeter, PermViewBilling, PermGenerateInvoice, PermManageTickets, PermAuditAccess, }, "account_user": { PermViewAccount, PermViewTenant, PermReadMeter, PermViewBilling, }, "property_user": { PermViewTenant, PermReadMeter, }, "technician": { PermReadMeter, PermUpdateMeter, }, }
Functions ¶
This section is empty.
Types ¶
type AccountValueMode ¶
type AccountValueMode string
type BalanceUnit ¶
type BalanceUnit string
type BillingAccountType ¶
type BillingAccountType string
type BillingMode ¶
type BillingMode string
type CreditSource ¶
type CreditSource string
const ( CreditSourceMpesa CreditSource = "mpesa" CreditSourceWallet CreditSource = "wallet" CreditSourceReversal CreditSource = "reversal" )
type InvoiceStatus ¶
type InvoiceStatus string
const ( InvoicePending InvoiceStatus = "pending" InvoicePaid InvoiceStatus = "paid" InvoiceOverdue InvoiceStatus = "overdue" )
type JSONTime ¶
func (JSONTime) MarshalJSON ¶
MarshalJSON converts JSONTime to JSON string
func (*JSONTime) UnmarshalJSON ¶
UnmarshalJSON parses JSON string to JSONTime
type MeterEventType ¶
type MeterEventType string
const ( EventPowerOn MeterEventType = "power_on" EventPowerOff MeterEventType = "power_off" EventValveOpen MeterEventType = "valve_open" EventValveClose MeterEventType = "valve_close" EventReading MeterEventType = "reading" EventTamper MeterEventType = "tamper" EventLeak MeterEventType = "leak" EventLowBattery MeterEventType = "low_battery" )
type NegativeStatus ¶
type NegativeStatus string
const ( NegativeStatusUnresolved NegativeStatus = "unresolved" NegativeStatusResolved NegativeStatus = "resolved" NegativeStatusFlagged NegativeStatus = "flagged" )
type Permission ¶
type Permission string
const ( // Account management PermCreateAccount Permission = "account:create" PermViewAccount Permission = "account:view" PermEditAccount Permission = "account:edit" // Tenant management PermCreateTenant Permission = "tenant:create" PermViewTenant Permission = "tenant:view" // Meter management PermReadMeter Permission = "meter:read" PermUpdateMeter Permission = "meter:update" // Billing PermViewBilling Permission = "billing:view" PermGenerateInvoice Permission = "billing:invoice" // Support PermManageTickets Permission = "support:manage" // System PermAuditAccess Permission = "audit:read" )
func AllPermissions ¶ added in v1.0.5
func AllPermissions() []Permission
AllPermissions returns a list of all available permissions
type PrepaidDebitReason ¶
type PrepaidDebitReason string
const ( DebitReasonUsage PrepaidDebitReason = "usage" // based on consumption DebitReasonInvoice PrepaidDebitReason = "invoice" // postpaid invoice deduction DebitReasonCorrection PrepaidDebitReason = "correction" // manual admin adjustment DebitReasonReversal PrepaidDebitReason = "reversal" // reversal of a previous incorrect debit )
type StringArray ¶
type StringArray []string
func (*StringArray) Scan ¶
func (a *StringArray) Scan(value interface{}) error
type TicketStatus ¶
type TicketStatus string
const ( TicketOpen TicketStatus = "open" TicketPending TicketStatus = "pending" TicketResolved TicketStatus = "resolved" TicketClosed TicketStatus = "closed" )
type TransactionStatus ¶
type TransactionStatus string
const ( TransactionStatusPending TransactionStatus = "pending" TransactionStatusConfirmed TransactionStatus = "confirmed" TransactionStatusFailed TransactionStatus = "failed" )
type TransactionType ¶
type TransactionType string
const ( TransactionTypeMpesa TransactionType = "mpesa" TransactionTypeWallet TransactionType = "wallet" TransactionTypeToken TransactionType = "token" )
type UtilityType ¶
type UtilityType string
const ( WaterMeter UtilityType = "water" PowerMeter UtilityType = "power" )
Click to show internal directories.
Click to hide internal directories.