Documentation ¶
Index ¶
- func ComposeMessage(addressing message.Addressing, subject string, b, a []string) error
- func CreateAccount(v *vault.Vault, addrStr, name, tokenStr string, kt bmcrypto.KeyType)
- func CreateAuthorizedKey(info *vault.AccountInfo, targetKey *bmcrypto.PubKey, validUntil time.Duration, ...) (string, error)
- func CreateOrganisation(v *vault.Vault, orgAddr, fullName string, orgValidations []string, ...)
- func CreateOrganisationInvite(vault *vault.Vault, orgAddr, inviteAddr, shortRoutingID string)
- func ListAccounts(v *vault.Vault, displayKeys bool)
- func ListMessages(accounts []vault.AccountInfo, since time.Time) int
- func ListOrganisations(v *vault.Vault, displayKeys bool)
- func OtpGenerate(info *vault.AccountInfo, otpServer *string)
- func ReadMessages(info *vault.AccountInfo, routingInfo *resolver.RoutingInfo, ...)
- type AccountData
- type AccountEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeMessage ¶
func ComposeMessage(addressing message.Addressing, subject string, b, a []string) error
ComposeMessage composes a new message from the given account Info to the "to" with given subject, blocks and attachments
func CreateAccount ¶
CreateAccount creates a new account locally in the vault, stores it on the mail server and pushes the public key to the resolver
func CreateAuthorizedKey ¶
func CreateAuthorizedKey(info *vault.AccountInfo, targetKey *bmcrypto.PubKey, validUntil time.Duration, desc string) (string, error)
CreateAuthorizedKey creates a new authorized key
func CreateOrganisation ¶
func CreateOrganisation(v *vault.Vault, orgAddr, fullName string, orgValidations []string, kt bmcrypto.KeyType)
CreateOrganisation creates a new organisation locally in the vault and pushes the public key to the resolver
func CreateOrganisationInvite ¶
CreateOrganisationInvite invites a user to an organisation on the given routing-id
func ListAccounts ¶
ListAccounts displays the current accounts available in the vault
func ListMessages ¶
func ListMessages(accounts []vault.AccountInfo, since time.Time) int
ListMessages will display message information from accounts and boxes
func ListOrganisations ¶
ListOrganisations displays the current accounts available in the vault
func OtpGenerate ¶
func OtpGenerate(info *vault.AccountInfo, otpServer *string)
OtpGenerate will generate an OTP valid for otpServer
func ReadMessages ¶
func ReadMessages(info *vault.AccountInfo, routingInfo *resolver.RoutingInfo, box, messageID string, since time.Time)
ReadMessages will read a specific message blocks
Types ¶
type AccountData ¶
type AccountData []AccountEntry
AccountData is the complete list of all messages we want to display.
func (AccountData) Less ¶
func (ad AccountData) Less(i, j int) bool
Less will sort account entries on account first, box second, idx third.
func (AccountData) Swap ¶
func (ad AccountData) Swap(i, j int)
Swap will swap two account data entries in the slice
type AccountEntry ¶
type AccountEntry struct {
// contains filtered or unexported fields
}
AccountEntry is a single entry to display