Documentation ¶
Index ¶
- type Audit
- type AuditAction
- type Audits
- type Core
- type Currency
- type Customer
- type Customers
- type Letter
- type License
- type Licenses
- type Mail
- type MailMessage
- type Metadata
- type Pattern
- type Patterns
- type Payment
- type PaymentProvider
- type PaymentStatus
- type Payments
- type SMTP
- type Section
- type SettingName
- type SignIn
- type Site
- type Term
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Audit ¶
type Audit struct { ID string `json:"id"` Section Section `json:"section"` Customer Customer `json:"customer"` Action AuditAction `json:"action"` Metadata webutil.MetaInfo `json:"metadata"` Created time.Time `json:"created"` }
Audit is ...
type AuditAction ¶
type AuditAction int
const ( OnSendMail AuditAction OnSignIn OnSignOut OnAdd OnUpdate OnDelete OnClone )
type Core ¶
type Core struct { ID string `json:"id"` Created *time.Time `json:"created,omitempty"` Updated *time.Time `json:"updated,omitempty"` }
Core is ...
type Currency ¶
type Currency int
const ( CurrencyEUR Currency CurrencyUSD CurrencyJPY CurrencyGBP CurrencyAUD CurrencyCAD CurrencyCHF CurrencyCNY CurrencySEK )
type Customer ¶
type Customer struct { Core Email string `json:"email"` Status bool `json:"status,omitempty"` Payments *Payments `json:"payments,omitempty"` }
Customer is a ...
type Customers ¶
type Customers struct { Total int `json:"total"` Customers []*Customer `json:"customers,omitempty"` }
Customers is ...
type Letter ¶
type Letter struct { Subject string `json:"subject"` Text string `json:"text"` Html string `json:"html"` }
Letter ...
type License ¶
type License struct { Core Payment *Payment `json:"payment,omitempty"` License *[]byte `json:"license,omitempty"` Hash string `json:"hash,omitempty"` Data string `json:"data,omitempty"` Status bool `json:"status"` }
License is a ...
type Mail ¶
type Mail struct { SenderName string `json:"sender_name"` SenderEmail string `json:"sender_email"` SMTP SMTP `json:"smtp"` }
Mail is ...
type MailMessage ¶
type MailMessage struct { To string `json:"to"` Letter Letter `json:"letter"` Data map[string]string `json:"data"` }
MailMessage ...
type Pattern ¶
type Pattern struct { Core Name string `json:"name"` Limit *Metadata `json:"limit,omitempty"` // license restrictions Term *Term `json:"term,omitempty"` // license validity period Price *int `json:"price,omitempty"` // price in Stripe format Currency *Currency `json:"currency,omitempty"` // currency Check *Metadata `json:"check,omitempty"` // what will be checked for license verification? Private bool `json:"private,omitempty"` // the pattern is available to the administrator only. Status bool `json:"status,omitempty"` // pattern activity Licenses *Licenses `json:"licenses,omitempty"` // licenses }
Pattern is a ...
type Payment ¶
type Payment struct { Core Customer *Customer `json:"customer,omitempty"` Pattern *Pattern `json:"pattern,omitempty"` Transaction *Transaction `json:"transaction,omitempty"` }
Payment is a ...
type PaymentStatus ¶
type PaymentStatus int
const ( PAID PaymentStatus UNPAID PROCESSED CANCELED FAILED )
type SMTP ¶
type SMTP struct { Host string `json:"host"` Port int `json:"port"` Encryption int `json:"encryption"` Username string `json:"username"` Password string `json:"password"` }
SMTP is ...
type Section ¶
type Section int
const ( SectionSystem Section SectionSetting SectionCustomer SectionPattern SectionLicense SectionPayment )
type SettingName ¶
type SettingName struct { ID string `json:"id,omitempty"` Key string `json:"key"` Value any `json:"value,omitempty"` }
SettingName is ...
type Site ¶
type Site struct { Domain string `json:"domain"` Name string `json:"name"` Signature string `json:"signature"` EmailSupport string `json:"email_support"` }
Site is ...
type Term ¶
type Term int
const ( Hour Term Day Week Month Year )
func (Term) ToDuration ¶
ToDuration converts a Term to its equivalent time.Duration.
type Transaction ¶
type Transaction struct { Provider PaymentProvider `json:"provider"` Status PaymentStatus `json:"status"` Meta Metadata `json:"meta,omitempty"` Payment *time.Time `json:"payment,omitempty"` }
TransactionTransactionTransaction is ...
Click to show internal directories.
Click to hide internal directories.