Documentation ¶
Index ¶
- Constants
- Variables
- func Filter[T any](arr []T, predicate func(T) bool) []T
- func FormatTime(t time.Time) string
- func Now() string
- func Num2Words(num int) string
- func ParseContact(out map[string]string, vals []string)
- func ParseTime(val string) (time.Time, error)
- func Remove[T any](arr []T, index int) ([]T, error)
- func SanitizeDateTime(val string) (string, error)
- func SanitizePath(s string) string
- type Account
- func (*Account) Descriptor() ([]byte, []int)deprecated
- func (x *Account) GetContact() map[string]string
- func (x *Account) GetDecimals() int32
- func (x *Account) GetDenom() string
- func (x *Account) GetId() string
- func (x *Account) GetInvoiceCodeFormat() string
- func (x *Account) GetInvoiceDuePeriod() uint32
- func (x *Account) GetInvoiceFileNameFormat() string
- func (x *Account) GetLocale() *Locale
- func (x *Account) GetName() string
- func (a *Account) MakeId(salt string) string
- func (a *Account) MakeInvoiceCode(inv []*Invoice, totalCount int, now time.Time) string
- func (*Account) ProtoMessage()
- func (x *Account) ProtoReflect() protoreflect.Message
- func (x *Account) Reset()
- func (x *Account) String() string
- type AccountTemplateContext
- func (*AccountTemplateContext) Descriptor() ([]byte, []int)deprecated
- func (x *AccountTemplateContext) GetAccounts() []*Account
- func (x *AccountTemplateContext) GetConfig() *Config
- func (x *AccountTemplateContext) GetTemplate() *Template
- func (*AccountTemplateContext) ProtoMessage()
- func (x *AccountTemplateContext) ProtoReflect() protoreflect.Message
- func (x *AccountTemplateContext) Reset()
- func (x *AccountTemplateContext) String() string
- type Accounts
- type AccountsArr
- type Client
- func (*Client) Descriptor() ([]byte, []int)deprecated
- func (x *Client) GetContact() map[string]string
- func (x *Client) GetDescription() string
- func (x *Client) GetId() string
- func (x *Client) GetInvoiceFileNameFormat() string
- func (x *Client) GetLocale() *Locale
- func (x *Client) GetName() string
- func (x *Client) GetNotes() []string
- func (a *Client) MakeId(salt string) string
- func (*Client) ProtoMessage()
- func (x *Client) ProtoReflect() protoreflect.Message
- func (x *Client) Reset()
- func (x *Client) String() string
- type ClientTemplateContext
- func (*ClientTemplateContext) Descriptor() ([]byte, []int)deprecated
- func (x *ClientTemplateContext) GetClients() []*Client
- func (x *ClientTemplateContext) GetConfig() *Config
- func (x *ClientTemplateContext) GetTemplate() *Template
- func (*ClientTemplateContext) ProtoMessage()
- func (x *ClientTemplateContext) ProtoReflect() protoreflect.Message
- func (x *ClientTemplateContext) Reset()
- func (x *ClientTemplateContext) String() string
- type Clients
- type ClientsArr
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (c *Config) Format(price *Price) string
- func (x *Config) GetExport() []*Config_Export
- func (x *Config) GetLocale() *Locale
- func (x *Config) GetParams() map[string]string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- func (c *Config) Translate(val string) string
- type Config_Export
- func (*Config_Export) Descriptor() ([]byte, []int)deprecated
- func (x *Config_Export) GetStyles() []*Config_Style
- func (x *Config_Export) GetWhat() string
- func (*Config_Export) ProtoMessage()
- func (x *Config_Export) ProtoReflect() protoreflect.Message
- func (x *Config_Export) Reset()
- func (x *Config_Export) String() string
- type Config_Style
- func (*Config_Style) Descriptor() ([]byte, []int)deprecated
- func (x *Config_Style) GetAlign() string
- func (x *Config_Style) GetFont() string
- func (x *Config_Style) GetWhat() string
- func (*Config_Style) ProtoMessage()
- func (x *Config_Style) ProtoReflect() protoreflect.Message
- func (x *Config_Style) Reset()
- func (x *Config_Style) String() string
- type Invoice
- func (*Invoice) Descriptor() ([]byte, []int)deprecated
- func (x *Invoice) GetAccount() *Account
- func (x *Invoice) GetClient() *Client
- func (x *Invoice) GetCode() string
- func (x *Invoice) GetDueDate() string
- func (x *Invoice) GetFileName() string
- func (x *Invoice) GetId() string
- func (x *Invoice) GetIssueDate() string
- func (x *Invoice) GetItems() []*Invoice_Item
- func (x *Invoice) GetMarketValue() *Price
- func (x *Invoice) GetParams() map[string]string
- func (x *Invoice) GetPayments() []*Invoice_Payment
- func (x *Invoice) GetProject() *Project
- func (x *Invoice) GetTotal() *Price
- func (inv *Invoice) MakeFileName() string
- func (inv *Invoice) MakeId() string
- func (*Invoice) ProtoMessage()
- func (x *Invoice) ProtoReflect() protoreflect.Message
- func (x *Invoice) Reset()
- func (x *Invoice) String() string
- func (inv *Invoice) Year() int
- type InvoiceTemplateContext
- func (*InvoiceTemplateContext) Descriptor() ([]byte, []int)deprecated
- func (x *InvoiceTemplateContext) GetAccount() *Account
- func (x *InvoiceTemplateContext) GetConfig() *Config
- func (x *InvoiceTemplateContext) GetInvoices() []*Invoice
- func (x *InvoiceTemplateContext) GetTemplate() *Template
- func (*InvoiceTemplateContext) ProtoMessage()
- func (x *InvoiceTemplateContext) ProtoReflect() protoreflect.Message
- func (x *InvoiceTemplateContext) Reset()
- func (ic *InvoiceTemplateContext) SelectedAccount(inv *Invoice) *Account
- func (x *InvoiceTemplateContext) String() string
- type Invoice_Item
- func (it *Invoice_Item) AdjustedRate() float32
- func (*Invoice_Item) Descriptor() ([]byte, []int)deprecated
- func (x *Invoice_Item) GetAmount() float32
- func (x *Invoice_Item) GetExtra() bool
- func (x *Invoice_Item) GetName() string
- func (x *Invoice_Item) GetRate() float32
- func (x *Invoice_Item) GetUnit() string
- func (it *Invoice_Item) Price(denom string) *Price
- func (*Invoice_Item) ProtoMessage()
- func (x *Invoice_Item) ProtoReflect() protoreflect.Message
- func (x *Invoice_Item) Reset()
- func (x *Invoice_Item) String() string
- type Invoice_Payment
- func (*Invoice_Payment) Descriptor() ([]byte, []int)deprecated
- func (x *Invoice_Payment) GetAmount() *Price
- func (x *Invoice_Payment) GetComment() string
- func (x *Invoice_Payment) GetDate() string
- func (x *Invoice_Payment) GetName() string
- func (*Invoice_Payment) ProtoMessage()
- func (x *Invoice_Payment) ProtoReflect() protoreflect.Message
- func (x *Invoice_Payment) Reset()
- func (x *Invoice_Payment) String() string
- type Invoices
- type Locale
- func (*Locale) Descriptor() ([]byte, []int)deprecated
- func (c *Locale) Format(price *Price) string
- func (x *Locale) GetTranslations() map[string]string
- func (*Locale) ProtoMessage()
- func (x *Locale) ProtoReflect() protoreflect.Message
- func (x *Locale) Reset()
- func (x *Locale) String() string
- func (c *Locale) Translate(val string) string
- type Price
- func (p *Price) Add(b *Price) *Price
- func (p *Price) Convert(b *Price) *Price
- func (*Price) Descriptor() ([]byte, []int)deprecated
- func (x *Price) GetAmount() float32
- func (x *Price) GetDecimals() uint32
- func (x *Price) GetDenom() string
- func (p *Price) Mul(rate float32) *Price
- func (p *Price) Pretty() string
- func (*Price) ProtoMessage()
- func (x *Price) ProtoReflect() protoreflect.Message
- func (x *Price) Reset()
- func (x *Price) String() string
- func (p *Price) Sub(b *Price) *Price
- func (p *Price) Words() string
- type Project
- func (p *Project) Denom() string
- func (*Project) Descriptor() ([]byte, []int)deprecated
- func (x *Project) GetAccount() *Account
- func (x *Project) GetClient() *Client
- func (x *Project) GetCompleted() bool
- func (x *Project) GetDescription() string
- func (x *Project) GetEndDate() string
- func (x *Project) GetFileName() string
- func (x *Project) GetHourly() float32
- func (x *Project) GetId() string
- func (x *Project) GetLog() []*Project_LogEntry
- func (x *Project) GetName() string
- func (x *Project) GetParams() map[string]string
- func (m *Project) GetRate() isProject_Rate
- func (x *Project) GetStartDate() string
- func (x *Project) GetTotal() float32
- func (a *Project) MakeId() string
- func (*Project) ProtoMessage()
- func (x *Project) ProtoReflect() protoreflect.Message
- func (p *Project) RateString() string
- func (x *Project) Reset()
- func (p *Project) SetRate(amount float32, hourly bool)
- func (x *Project) String() string
- func (p *Project) TotalDuration() time.Duration
- func (p *Project) TotalPrice() *Price
- func (p *Project) TotalProgress() float32
- type ProjectTemplateContext
- func (*ProjectTemplateContext) Descriptor() ([]byte, []int)deprecated
- func (x *ProjectTemplateContext) GetConfig() *Config
- func (x *ProjectTemplateContext) GetProjects() []*Project
- func (x *ProjectTemplateContext) GetTemplate() *Template
- func (*ProjectTemplateContext) ProtoMessage()
- func (x *ProjectTemplateContext) ProtoReflect() protoreflect.Message
- func (x *ProjectTemplateContext) Reset()
- func (x *ProjectTemplateContext) String() string
- type Project_Hourly
- type Project_LogEntry
- func (*Project_LogEntry) Descriptor() ([]byte, []int)deprecated
- func (x *Project_LogEntry) GetDescription() string
- func (x *Project_LogEntry) GetDuration() int64
- func (x *Project_LogEntry) GetProgress() float32
- func (x *Project_LogEntry) GetStart() string
- func (pl *Project_LogEntry) Price(p *Project) *Price
- func (*Project_LogEntry) ProtoMessage()
- func (x *Project_LogEntry) ProtoReflect() protoreflect.Message
- func (x *Project_LogEntry) Reset()
- func (x *Project_LogEntry) String() string
- type Project_Total
- type ProjectsArr
- type Template
- func (*Template) Descriptor() ([]byte, []int)deprecated
- func (x *Template) GetFileName() string
- func (x *Template) GetId() string
- func (x *Template) GetParams() map[string]string
- func (x *Template) GetText() []byte
- func (x *Template) GetWhat() string
- func (a *Template) MakeId() string
- func (*Template) ProtoMessage()
- func (x *Template) ProtoReflect() protoreflect.Message
- func (x *Template) Reset()
- func (x *Template) String() string
Constants ¶
const ( ContactFullName = "Full Name" ContactName = "Name" ContactPersonalCode = "Personal Code" ContactRegistrationNumber = "Reg. #" ContactCompanyRegistrationNumber = "Company Reg. #" ContactVAT = "VAT" ContactAddress = "Address" ContactPhone = "Phone" ContactCellPhone = "Cell" ContactFax = "Cell" ContactEmail = "Email" ContactBankAccount = "Bank Account" ContactWalletAddress = "Wallet Address" ContactDirector = "Director" )
const SaneDateTimeLayout = "2006-01-02 15:04"
Variables ¶
var File_models_proto protoreflect.FileDescriptor
Functions ¶
func FormatTime ¶
func Num2Words ¶
Adapted from https://socketloop.com/tutorials/golang-how-to-convert-a-number-to-words
func ParseContact ¶
func SanitizeDateTime ¶
func SanitizePath ¶
Types ¶
type Account ¶
type Account struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` Decimals int32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` Contact map[string]string `` /* 156-byte string literal not displayed */ InvoiceFileNameFormat string `protobuf:"bytes,100,opt,name=invoiceFileNameFormat,proto3" json:"invoiceFileNameFormat,omitempty"` InvoiceCodeFormat string `protobuf:"bytes,101,opt,name=invoiceCodeFormat,proto3" json:"invoiceCodeFormat,omitempty"` InvoiceDuePeriod uint32 `protobuf:"varint,102,opt,name=invoiceDuePeriod,proto3" json:"invoiceDuePeriod,omitempty"` Locale *Locale `protobuf:"bytes,500,opt,name=locale,proto3" json:"locale,omitempty"` // contains filtered or unexported fields }
func (*Account) Descriptor
deprecated
func (*Account) GetContact ¶
func (*Account) GetDecimals ¶
func (*Account) GetInvoiceCodeFormat ¶
func (*Account) GetInvoiceDuePeriod ¶
func (*Account) GetInvoiceFileNameFormat ¶
func (*Account) MakeInvoiceCode ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type AccountTemplateContext ¶
type AccountTemplateContext struct { Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` Template *Template `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` Accounts []*Account `protobuf:"bytes,10,rep,name=accounts,proto3" json:"accounts,omitempty"` // contains filtered or unexported fields }
func (*AccountTemplateContext) Descriptor
deprecated
func (*AccountTemplateContext) Descriptor() ([]byte, []int)
Deprecated: Use AccountTemplateContext.ProtoReflect.Descriptor instead.
func (*AccountTemplateContext) GetAccounts ¶
func (x *AccountTemplateContext) GetAccounts() []*Account
func (*AccountTemplateContext) GetConfig ¶
func (x *AccountTemplateContext) GetConfig() *Config
func (*AccountTemplateContext) GetTemplate ¶
func (x *AccountTemplateContext) GetTemplate() *Template
func (*AccountTemplateContext) ProtoMessage ¶
func (*AccountTemplateContext) ProtoMessage()
func (*AccountTemplateContext) ProtoReflect ¶
func (x *AccountTemplateContext) ProtoReflect() protoreflect.Message
func (*AccountTemplateContext) Reset ¶
func (x *AccountTemplateContext) Reset()
func (*AccountTemplateContext) String ¶
func (x *AccountTemplateContext) String() string
type Accounts ¶
type Accounts struct { Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` Params map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Accounts) Descriptor
deprecated
func (*Accounts) GetAccounts ¶
func (*Accounts) ProtoMessage ¶
func (*Accounts) ProtoMessage()
func (*Accounts) ProtoReflect ¶
func (x *Accounts) ProtoReflect() protoreflect.Message
type AccountsArr ¶
type AccountsArr []*Account
func (AccountsArr) ByDenom ¶
func (arr AccountsArr) ByDenom(denom string) *Account
func (AccountsArr) ById ¶
func (arr AccountsArr) ById(id string) *Account
func (AccountsArr) ByName ¶
func (arr AccountsArr) ByName(name string) *Account
type Client ¶
type Client struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Notes []string `protobuf:"bytes,4,rep,name=notes,proto3" json:"notes,omitempty"` Contact map[string]string `` /* 155-byte string literal not displayed */ InvoiceFileNameFormat string `protobuf:"bytes,100,opt,name=invoiceFileNameFormat,proto3" json:"invoiceFileNameFormat,omitempty"` Locale *Locale `protobuf:"bytes,500,opt,name=locale,proto3" json:"locale,omitempty"` // contains filtered or unexported fields }
func (*Client) Descriptor
deprecated
func (*Client) GetContact ¶
func (*Client) GetDescription ¶
func (*Client) GetInvoiceFileNameFormat ¶
func (*Client) ProtoMessage ¶
func (*Client) ProtoMessage()
func (*Client) ProtoReflect ¶
func (x *Client) ProtoReflect() protoreflect.Message
type ClientTemplateContext ¶
type ClientTemplateContext struct { Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` Template *Template `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` Clients []*Client `protobuf:"bytes,10,rep,name=clients,proto3" json:"clients,omitempty"` // contains filtered or unexported fields }
func (*ClientTemplateContext) Descriptor
deprecated
func (*ClientTemplateContext) Descriptor() ([]byte, []int)
Deprecated: Use ClientTemplateContext.ProtoReflect.Descriptor instead.
func (*ClientTemplateContext) GetClients ¶
func (x *ClientTemplateContext) GetClients() []*Client
func (*ClientTemplateContext) GetConfig ¶
func (x *ClientTemplateContext) GetConfig() *Config
func (*ClientTemplateContext) GetTemplate ¶
func (x *ClientTemplateContext) GetTemplate() *Template
func (*ClientTemplateContext) ProtoMessage ¶
func (*ClientTemplateContext) ProtoMessage()
func (*ClientTemplateContext) ProtoReflect ¶
func (x *ClientTemplateContext) ProtoReflect() protoreflect.Message
func (*ClientTemplateContext) Reset ¶
func (x *ClientTemplateContext) Reset()
func (*ClientTemplateContext) String ¶
func (x *ClientTemplateContext) String() string
type Clients ¶
type Clients struct { Clients []*Client `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"` Params map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Clients) Descriptor
deprecated
func (*Clients) GetClients ¶
func (*Clients) ProtoMessage ¶
func (*Clients) ProtoMessage()
func (*Clients) ProtoReflect ¶
func (x *Clients) ProtoReflect() protoreflect.Message
type ClientsArr ¶
type ClientsArr []*Client
func (ClientsArr) ById ¶
func (arr ClientsArr) ById(id string) *Client
func (ClientsArr) ByName ¶
func (arr ClientsArr) ByName(name string) *Client
type Config ¶
type Config struct { Export []*Config_Export `protobuf:"bytes,10,rep,name=export,proto3" json:"export,omitempty"` Params map[string]string `` /* 155-byte string literal not displayed */ Locale *Locale `protobuf:"bytes,500,opt,name=locale,proto3" json:"locale,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetExport ¶
func (x *Config) GetExport() []*Config_Export
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Config_Export ¶
type Config_Export struct { What string `protobuf:"bytes,1,opt,name=what,proto3" json:"what,omitempty"` Styles []*Config_Style `protobuf:"bytes,2,rep,name=styles,proto3" json:"styles,omitempty"` // contains filtered or unexported fields }
func (*Config_Export) Descriptor
deprecated
func (*Config_Export) Descriptor() ([]byte, []int)
Deprecated: Use Config_Export.ProtoReflect.Descriptor instead.
func (*Config_Export) GetStyles ¶
func (x *Config_Export) GetStyles() []*Config_Style
func (*Config_Export) GetWhat ¶
func (x *Config_Export) GetWhat() string
func (*Config_Export) ProtoMessage ¶
func (*Config_Export) ProtoMessage()
func (*Config_Export) ProtoReflect ¶
func (x *Config_Export) ProtoReflect() protoreflect.Message
func (*Config_Export) Reset ¶
func (x *Config_Export) Reset()
func (*Config_Export) String ¶
func (x *Config_Export) String() string
type Config_Style ¶
type Config_Style struct { What string `protobuf:"bytes,1,opt,name=what,proto3" json:"what,omitempty"` Font string `protobuf:"bytes,2,opt,name=font,proto3" json:"font,omitempty"` Align string `protobuf:"bytes,3,opt,name=align,proto3" json:"align,omitempty"` // contains filtered or unexported fields }
func (*Config_Style) Descriptor
deprecated
func (*Config_Style) Descriptor() ([]byte, []int)
Deprecated: Use Config_Style.ProtoReflect.Descriptor instead.
func (*Config_Style) GetAlign ¶
func (x *Config_Style) GetAlign() string
func (*Config_Style) GetFont ¶
func (x *Config_Style) GetFont() string
func (*Config_Style) GetWhat ¶
func (x *Config_Style) GetWhat() string
func (*Config_Style) ProtoMessage ¶
func (*Config_Style) ProtoMessage()
func (*Config_Style) ProtoReflect ¶
func (x *Config_Style) ProtoReflect() protoreflect.Message
func (*Config_Style) Reset ¶
func (x *Config_Style) Reset()
func (*Config_Style) String ¶
func (x *Config_Style) String() string
type Invoice ¶
type Invoice struct { FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` // internal: filename of the invoice file Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // unique id of the invoice Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` // registration code IssueDate string `protobuf:"bytes,5,opt,name=issueDate,proto3" json:"issueDate,omitempty"` // date-time when the invoice was issued at DueDate string `protobuf:"bytes,6,opt,name=dueDate,proto3" json:"dueDate,omitempty"` // the invoice must be payed until this date Params map[string]string `` /* 154-byte string literal not displayed */ Project *Project `protobuf:"bytes,30,opt,name=project,proto3" json:"project,omitempty"` // Copy of a project (if any) Client *Client `protobuf:"bytes,32,opt,name=client,proto3" json:"client,omitempty"` // Copy of a client Account *Account `protobuf:"bytes,33,opt,name=account,proto3" json:"account,omitempty"` // Copy of an account Items []*Invoice_Item `protobuf:"bytes,50,rep,name=items,proto3" json:"items,omitempty"` // Billable, discount, shipping, etc items. Also, extra items. Total *Price `protobuf:"bytes,100,opt,name=total,proto3" json:"total,omitempty"` MarketValue *Price `protobuf:"bytes,101,opt,name=marketValue,proto3" json:"marketValue,omitempty"` // if set, will force recalculation into this denomination Payments []*Invoice_Payment `protobuf:"bytes,200,rep,name=payments,proto3" json:"payments,omitempty"` // contains filtered or unexported fields }
func (*Invoice) Descriptor
deprecated
func (*Invoice) GetAccount ¶
func (*Invoice) GetDueDate ¶
func (*Invoice) GetFileName ¶
func (*Invoice) GetIssueDate ¶
func (*Invoice) GetItems ¶
func (x *Invoice) GetItems() []*Invoice_Item
func (*Invoice) GetMarketValue ¶
func (*Invoice) GetPayments ¶
func (x *Invoice) GetPayments() []*Invoice_Payment
func (*Invoice) GetProject ¶
func (*Invoice) MakeFileName ¶
func (*Invoice) ProtoMessage ¶
func (*Invoice) ProtoMessage()
func (*Invoice) ProtoReflect ¶
func (x *Invoice) ProtoReflect() protoreflect.Message
type InvoiceTemplateContext ¶
type InvoiceTemplateContext struct { Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` Template *Template `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` Account *Account `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` Invoices []*Invoice `protobuf:"bytes,10,rep,name=invoices,proto3" json:"invoices,omitempty"` // contains filtered or unexported fields }
func (*InvoiceTemplateContext) Descriptor
deprecated
func (*InvoiceTemplateContext) Descriptor() ([]byte, []int)
Deprecated: Use InvoiceTemplateContext.ProtoReflect.Descriptor instead.
func (*InvoiceTemplateContext) GetAccount ¶
func (x *InvoiceTemplateContext) GetAccount() *Account
func (*InvoiceTemplateContext) GetConfig ¶
func (x *InvoiceTemplateContext) GetConfig() *Config
func (*InvoiceTemplateContext) GetInvoices ¶
func (x *InvoiceTemplateContext) GetInvoices() []*Invoice
func (*InvoiceTemplateContext) GetTemplate ¶
func (x *InvoiceTemplateContext) GetTemplate() *Template
func (*InvoiceTemplateContext) ProtoMessage ¶
func (*InvoiceTemplateContext) ProtoMessage()
func (*InvoiceTemplateContext) ProtoReflect ¶
func (x *InvoiceTemplateContext) ProtoReflect() protoreflect.Message
func (*InvoiceTemplateContext) Reset ¶
func (x *InvoiceTemplateContext) Reset()
func (*InvoiceTemplateContext) SelectedAccount ¶
func (ic *InvoiceTemplateContext) SelectedAccount(inv *Invoice) *Account
func (*InvoiceTemplateContext) String ¶
func (x *InvoiceTemplateContext) String() string
type Invoice_Item ¶
type Invoice_Item struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` Amount float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"` Rate float32 `protobuf:"fixed32,4,opt,name=rate,proto3" json:"rate,omitempty"` Extra bool `protobuf:"varint,10,opt,name=extra,proto3" json:"extra,omitempty"` // indicates whether this is an extra (applied after total) // contains filtered or unexported fields }
func (*Invoice_Item) AdjustedRate ¶
func (it *Invoice_Item) AdjustedRate() float32
func (*Invoice_Item) Descriptor
deprecated
func (*Invoice_Item) Descriptor() ([]byte, []int)
Deprecated: Use Invoice_Item.ProtoReflect.Descriptor instead.
func (*Invoice_Item) GetAmount ¶
func (x *Invoice_Item) GetAmount() float32
func (*Invoice_Item) GetExtra ¶
func (x *Invoice_Item) GetExtra() bool
func (*Invoice_Item) GetName ¶
func (x *Invoice_Item) GetName() string
func (*Invoice_Item) GetRate ¶
func (x *Invoice_Item) GetRate() float32
func (*Invoice_Item) GetUnit ¶
func (x *Invoice_Item) GetUnit() string
func (*Invoice_Item) Price ¶
func (it *Invoice_Item) Price(denom string) *Price
func (*Invoice_Item) ProtoMessage ¶
func (*Invoice_Item) ProtoMessage()
func (*Invoice_Item) ProtoReflect ¶
func (x *Invoice_Item) ProtoReflect() protoreflect.Message
func (*Invoice_Item) Reset ¶
func (x *Invoice_Item) Reset()
func (*Invoice_Item) String ¶
func (x *Invoice_Item) String() string
type Invoice_Payment ¶
type Invoice_Payment struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Date string `protobuf:"bytes,2,opt,name=date,proto3" json:"date,omitempty"` Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` Amount *Price `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*Invoice_Payment) Descriptor
deprecated
func (*Invoice_Payment) Descriptor() ([]byte, []int)
Deprecated: Use Invoice_Payment.ProtoReflect.Descriptor instead.
func (*Invoice_Payment) GetAmount ¶
func (x *Invoice_Payment) GetAmount() *Price
func (*Invoice_Payment) GetComment ¶
func (x *Invoice_Payment) GetComment() string
func (*Invoice_Payment) GetDate ¶
func (x *Invoice_Payment) GetDate() string
func (*Invoice_Payment) GetName ¶
func (x *Invoice_Payment) GetName() string
func (*Invoice_Payment) ProtoMessage ¶
func (*Invoice_Payment) ProtoMessage()
func (*Invoice_Payment) ProtoReflect ¶
func (x *Invoice_Payment) ProtoReflect() protoreflect.Message
func (*Invoice_Payment) Reset ¶
func (x *Invoice_Payment) Reset()
func (*Invoice_Payment) String ¶
func (x *Invoice_Payment) String() string
type Locale ¶
type Locale struct { Translations map[string]string `` /* 165-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Locale) Descriptor
deprecated
func (*Locale) GetTranslations ¶
func (*Locale) ProtoMessage ¶
func (*Locale) ProtoMessage()
func (*Locale) ProtoReflect ¶
func (x *Locale) ProtoReflect() protoreflect.Message
type Price ¶
type Price struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Amount float32 `protobuf:"fixed32,2,opt,name=amount,proto3" json:"amount,omitempty"` Decimals uint32 `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"` // contains filtered or unexported fields }
func (*Price) Convert ¶
Convert converts one denomination to another given that the second is represented in the first denomination. E.g. first price is 10Eth while the second is 4000Eur (per Eth) Therefore 10Eth.Convert(4000Eur) will be equal to 40000Eur
func (*Price) Descriptor
deprecated
func (*Price) GetDecimals ¶
func (*Price) ProtoMessage ¶
func (*Price) ProtoMessage()
func (*Price) ProtoReflect ¶
func (x *Price) ProtoReflect() protoreflect.Message
type Project ¶
type Project struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` FileName string `protobuf:"bytes,4,opt,name=fileName,proto3" json:"fileName,omitempty"` // Types that are assignable to Rate: // *Project_Hourly // *Project_Total Rate isProject_Rate `protobuf_oneof:"rate"` Completed bool `protobuf:"varint,7,opt,name=completed,proto3" json:"completed,omitempty"` Params map[string]string `` /* 154-byte string literal not displayed */ StartDate string `protobuf:"bytes,20,opt,name=startDate,proto3" json:"startDate,omitempty"` EndDate string `protobuf:"bytes,21,opt,name=endDate,proto3" json:"endDate,omitempty"` Account *Account `protobuf:"bytes,31,opt,name=account,proto3" json:"account,omitempty"` Client *Client `protobuf:"bytes,30,opt,name=client,proto3" json:"client,omitempty"` Log []*Project_LogEntry `protobuf:"bytes,50,rep,name=log,proto3" json:"log,omitempty"` // contains filtered or unexported fields }
func (*Project) Descriptor
deprecated
func (*Project) GetAccount ¶
func (*Project) GetCompleted ¶
func (*Project) GetDescription ¶
func (*Project) GetEndDate ¶
func (*Project) GetFileName ¶
func (*Project) GetLog ¶
func (x *Project) GetLog() []*Project_LogEntry
func (*Project) GetStartDate ¶
func (*Project) ProtoMessage ¶
func (*Project) ProtoMessage()
func (*Project) ProtoReflect ¶
func (x *Project) ProtoReflect() protoreflect.Message
func (*Project) RateString ¶
func (*Project) TotalDuration ¶
func (*Project) TotalPrice ¶
func (*Project) TotalProgress ¶
type ProjectTemplateContext ¶
type ProjectTemplateContext struct { Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` Template *Template `protobuf:"bytes,2,opt,name=template,proto3" json:"template,omitempty"` Projects []*Project `protobuf:"bytes,10,rep,name=projects,proto3" json:"projects,omitempty"` // contains filtered or unexported fields }
func (*ProjectTemplateContext) Descriptor
deprecated
func (*ProjectTemplateContext) Descriptor() ([]byte, []int)
Deprecated: Use ProjectTemplateContext.ProtoReflect.Descriptor instead.
func (*ProjectTemplateContext) GetConfig ¶
func (x *ProjectTemplateContext) GetConfig() *Config
func (*ProjectTemplateContext) GetProjects ¶
func (x *ProjectTemplateContext) GetProjects() []*Project
func (*ProjectTemplateContext) GetTemplate ¶
func (x *ProjectTemplateContext) GetTemplate() *Template
func (*ProjectTemplateContext) ProtoMessage ¶
func (*ProjectTemplateContext) ProtoMessage()
func (*ProjectTemplateContext) ProtoReflect ¶
func (x *ProjectTemplateContext) ProtoReflect() protoreflect.Message
func (*ProjectTemplateContext) Reset ¶
func (x *ProjectTemplateContext) Reset()
func (*ProjectTemplateContext) String ¶
func (x *ProjectTemplateContext) String() string
type Project_Hourly ¶
type Project_Hourly struct {
Hourly float32 `protobuf:"fixed32,5,opt,name=hourly,proto3,oneof"`
}
type Project_LogEntry ¶
type Project_LogEntry struct { Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` Start string `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` Duration int64 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` Progress float32 `protobuf:"fixed32,4,opt,name=progress,proto3" json:"progress,omitempty"` // contains filtered or unexported fields }
func (*Project_LogEntry) Descriptor
deprecated
func (*Project_LogEntry) Descriptor() ([]byte, []int)
Deprecated: Use Project_LogEntry.ProtoReflect.Descriptor instead.
func (*Project_LogEntry) GetDescription ¶
func (x *Project_LogEntry) GetDescription() string
func (*Project_LogEntry) GetDuration ¶
func (x *Project_LogEntry) GetDuration() int64
func (*Project_LogEntry) GetProgress ¶
func (x *Project_LogEntry) GetProgress() float32
func (*Project_LogEntry) GetStart ¶
func (x *Project_LogEntry) GetStart() string
func (*Project_LogEntry) Price ¶
func (pl *Project_LogEntry) Price(p *Project) *Price
func (*Project_LogEntry) ProtoMessage ¶
func (*Project_LogEntry) ProtoMessage()
func (*Project_LogEntry) ProtoReflect ¶
func (x *Project_LogEntry) ProtoReflect() protoreflect.Message
func (*Project_LogEntry) Reset ¶
func (x *Project_LogEntry) Reset()
func (*Project_LogEntry) String ¶
func (x *Project_LogEntry) String() string
type Project_Total ¶
type Project_Total struct {
Total float32 `protobuf:"fixed32,6,opt,name=total,proto3,oneof"`
}
type ProjectsArr ¶
type ProjectsArr []*Project
func (ProjectsArr) ById ¶
func (arr ProjectsArr) ById(id string) *Project
func (ProjectsArr) ByName ¶
func (arr ProjectsArr) ByName(name string) *Project
type Template ¶
type Template struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` What string `protobuf:"bytes,2,opt,name=what,proto3" json:"what,omitempty"` FileName string `protobuf:"bytes,3,opt,name=fileName,proto3" json:"fileName,omitempty"` Params map[string]string `` /* 153-byte string literal not displayed */ Text []byte `protobuf:"bytes,10,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*Template) Descriptor
deprecated
func (*Template) GetFileName ¶
func (*Template) ProtoMessage ¶
func (*Template) ProtoMessage()
func (*Template) ProtoReflect ¶
func (x *Template) ProtoReflect() protoreflect.Message