Documentation ¶
Index ¶
- func IsValidAddress(address string) bool
- type Address
- func (a *Address) Bytes() []byte
- func (a *Address) HasOrganisationPart() bool
- func (a *Address) Hash() hash.Hash
- func (a *Address) LocalHash() hash.Hash
- func (a *Address) MarshalJSON() ([]byte, error)
- func (a *Address) OrgHash() hash.Hash
- func (a *Address) String() string
- func (a *Address) UnmarshalJSON(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidAddress ¶
IsValidAddress returns true when the given string is a valid BitMaelum address
Types ¶
type Address ¶
type Address struct { Local string // Local part is either <local>! or <local>@<organisation>! Org string // Org part is either "" in case of <local>! or <local>@<organisation>! }
Address represents a bitMaelum address
func NewAddress ¶
NewAddress returns a valid address structure based on the given address
func (*Address) HasOrganisationPart ¶
HasOrganisationPart returns true when the address is an organisational address (user@org!)
func (*Address) MarshalJSON ¶
MarshalJSON will marshal an address into a string of bytes for JSON output
func (*Address) UnmarshalJSON ¶
UnmarshalJSON will unmarshal a string of bytes into an address
Click to show internal directories.
Click to hide internal directories.