address

package
v1.4.5-alpha1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2019 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package address is a default implementation of models/visitor package visitor address related interfaces

Index

Constants

View Source
const (
	ConstCollectionNameVisitorAddress = "visitor_address"

	ConstErrorModule = "visitor/address"
	ConstErrorLevel  = env.ConstErrorLevelActor
)

Package global constants

Variables

This section is empty.

Functions

func APICreateVisitorAddress

func APICreateVisitorAddress(context api.InterfaceApplicationContext) (interface{}, error)

APICreateVisitorAddress creates a new visitor address

  • visitor address attributes should be specified in content
  • "visitor_id" attribute required

func APIDeleteVisitorAddress

func APIDeleteVisitorAddress(context api.InterfaceApplicationContext) (interface{}, error)

APIDeleteVisitorAddress deletes existing visitor address

  • visitor address id must be specified in "addressID" argument

func APIGetVisitorAddress

func APIGetVisitorAddress(context api.InterfaceApplicationContext) (interface{}, error)

APIGetVisitorAddress returns visitor address information

  • visitor address id must be specified in "addressID" argument

func APIListVisitorAddressAttributes

func APIListVisitorAddressAttributes(context api.InterfaceApplicationContext) (interface{}, error)

APIListVisitorAddressAttributes returns a list of visitor address attributes

func APIListVisitorAddresses

func APIListVisitorAddresses(context api.InterfaceApplicationContext) (interface{}, error)

APIListVisitorAddresses returns visitor addresses list

  • visitor id must be specified in "visitorID" argument

func APIUpdateVisitorAddress

func APIUpdateVisitorAddress(context api.InterfaceApplicationContext) (interface{}, error)

APIUpdateVisitorAddress updates existing visitor address

  • visitor address id must be specified in "addressID" argument
  • visitor address attributes should be specified in content

Types

type DefaultVisitorAddress

type DefaultVisitorAddress struct {
	FirstName string
	LastName  string

	Company string

	Country string
	State   string
	City    string

	AddressLine1 string
	AddressLine2 string

	Phone   string
	ZipCode string
	// contains filtered or unexported fields
}

DefaultVisitorAddress is a default implementer of InterfaceVisitorAddress

func (*DefaultVisitorAddress) Delete

func (it *DefaultVisitorAddress) Delete() error

Delete will remove the Visitor Address from the database

func (*DefaultVisitorAddress) FromHashMap

func (it *DefaultVisitorAddress) FromHashMap(input map[string]interface{}) error

FromHashMap will take a map[string]interface and apply the attribute values to the Visitor Address

func (*DefaultVisitorAddress) Get

func (it *DefaultVisitorAddress) Get(attribute string) interface{}

Get will return the requested attribute when provided a string representation of the attribute

func (*DefaultVisitorAddress) GetAddress

func (it *DefaultVisitorAddress) GetAddress() string

GetAddress will return the full Address of the current Visitor Address

func (*DefaultVisitorAddress) GetAddressLine1

func (it *DefaultVisitorAddress) GetAddressLine1() string

GetAddressLine1 will return the Line 1 attribute of the Visitor Address

func (*DefaultVisitorAddress) GetAddressLine2

func (it *DefaultVisitorAddress) GetAddressLine2() string

GetAddressLine2 will return the Line 2 attribute of the Visitor Address

func (*DefaultVisitorAddress) GetAttributesInfo

func (it *DefaultVisitorAddress) GetAttributesInfo() []models.StructAttributeInfo

GetAttributesInfo will return a set of Vistor Address attributes in []models.StructAttributeInfo

func (*DefaultVisitorAddress) GetCity

func (it *DefaultVisitorAddress) GetCity() string

GetCity will return the City attribute of the Visitor Address

func (*DefaultVisitorAddress) GetCollection

func (it *DefaultVisitorAddress) GetCollection() models.InterfaceCollection

GetCollection returns collection of current instance type

func (*DefaultVisitorAddress) GetCompany

func (it *DefaultVisitorAddress) GetCompany() string

GetCompany will return the Company attribute of the Visitor Address

func (*DefaultVisitorAddress) GetCountry

func (it *DefaultVisitorAddress) GetCountry() string

GetCountry will return the Country attribute of the Visitor Address

func (*DefaultVisitorAddress) GetFirstName

func (it *DefaultVisitorAddress) GetFirstName() string

GetFirstName returns the First Name of the Visitor Address

func (*DefaultVisitorAddress) GetID

func (it *DefaultVisitorAddress) GetID() string

GetID returns the Default Visitor Address as a string

func (*DefaultVisitorAddress) GetImplementationName

func (it *DefaultVisitorAddress) GetImplementationName() string

GetImplementationName returns the Implementation name

func (*DefaultVisitorAddress) GetLastName

func (it *DefaultVisitorAddress) GetLastName() string

GetLastName returns the Last Name of the Visitor Address

func (*DefaultVisitorAddress) GetModelName

func (it *DefaultVisitorAddress) GetModelName() string

GetModelName returns the Visitor Address Model

func (*DefaultVisitorAddress) GetPhone

func (it *DefaultVisitorAddress) GetPhone() string

GetPhone will return the phone attribute of the Visitor Address

func (*DefaultVisitorAddress) GetState

func (it *DefaultVisitorAddress) GetState() string

GetState will return the State attribute of the Visitor Address

func (*DefaultVisitorAddress) GetVisitorID

func (it *DefaultVisitorAddress) GetVisitorID() string

GetVisitorID returns the Visitor ID for the Visitor Address

func (*DefaultVisitorAddress) GetZipCode

func (it *DefaultVisitorAddress) GetZipCode() string

GetZipCode will return the zip code attribute of the Visitor Address

func (*DefaultVisitorAddress) Load

func (it *DefaultVisitorAddress) Load(ID string) error

Load will take Visitor Address ID and retrieve it from the database

func (*DefaultVisitorAddress) New

New creates a new Visitor Address interface

func (*DefaultVisitorAddress) Save

func (it *DefaultVisitorAddress) Save() error

Save will persiste the Visitor Address to the database

func (*DefaultVisitorAddress) Set

func (it *DefaultVisitorAddress) Set(attribute string, value interface{}) error

Set will set a Visitor Address attribute and requiring a name and a value

func (*DefaultVisitorAddress) SetID

func (it *DefaultVisitorAddress) SetID(NewID string) error

SetID takes a string as input and sets the ID on the Visitor Address

func (*DefaultVisitorAddress) ToHashMap

func (it *DefaultVisitorAddress) ToHashMap() map[string]interface{}

ToHashMap will return a set of Visitor Address attributes in a map[string]interface

type DefaultVisitorAddressCollection

type DefaultVisitorAddressCollection struct {
	// contains filtered or unexported fields
}

DefaultVisitorAddressCollection is a default implementer of InterfaceVisitorAddressCollection

func (*DefaultVisitorAddressCollection) GetDBCollection

GetDBCollection returns the database collection of the Visitor Address

func (*DefaultVisitorAddressCollection) GetImplementationName

func (it *DefaultVisitorAddressCollection) GetImplementationName() string

GetImplementationName returns the Visitor Address implementation name

func (*DefaultVisitorAddressCollection) GetModelName

func (it *DefaultVisitorAddressCollection) GetModelName() string

GetModelName returns the Visitor Address model

func (*DefaultVisitorAddressCollection) List

List enumerates items of VisitorAddress model type

func (*DefaultVisitorAddressCollection) ListAddExtraAttribute

func (it *DefaultVisitorAddressCollection) ListAddExtraAttribute(attribute string) error

ListAddExtraAttribute allows to obtain additional attributes from List() function

func (*DefaultVisitorAddressCollection) ListFilterAdd

func (it *DefaultVisitorAddressCollection) ListFilterAdd(Attribute string, Operator string, Value interface{}) error

ListFilterAdd adds selection filter to List() function

func (*DefaultVisitorAddressCollection) ListFilterReset

func (it *DefaultVisitorAddressCollection) ListFilterReset() error

ListFilterReset clears presets made by ListFilterAdd() and ListAddExtraAttribute() functions

func (*DefaultVisitorAddressCollection) ListLimit

func (it *DefaultVisitorAddressCollection) ListLimit(offset int, limit int) error

ListLimit sets select pagination

func (*DefaultVisitorAddressCollection) ListVisitorsAddresses

func (it *DefaultVisitorAddressCollection) ListVisitorsAddresses() []visitor.InterfaceVisitorAddress

ListVisitorsAddresses returns list of visitor model items for the Visitor Address

func (*DefaultVisitorAddressCollection) New

New creates a new Visitor Address Collection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL