Documentation ¶
Overview ¶
Package data provides an interface for creating and using different types of data, usually in the context of an MVC
Index ¶
- type Data
- type PAN
- func (pan PAN) GetBillingAddress() string
- func (pan PAN) GetCardHolder() string
- func (pan PAN) GetCardNumber() string
- func (pan PAN) GetExperationDate() time.Time
- func (pan PAN) GetID() string
- func (pan *PAN) SetBillingAddress(newAddress string)
- func (pan *PAN) SetCardHolder(newCardHolder string)
- func (pan *PAN) SetCardNumber(newCardNumber string)
- func (pan *PAN) SetExperationDate(newDate time.Time)
- func (pan *PAN) SetID(newID string)
- func (pan PAN) ToJSON() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data interface { ToJSON() []byte // Convert to a JSON byte array GetID() string // Get the ID of the pan SetID(string) // Set the Id of the pan }
Data defines an interface describing the methods required for a Data type.
type PAN ¶
type PAN struct {
// contains filtered or unexported fields
}
PAN is a Key type that encapsulates PAN data.
func NewPANFromJSON ¶
NewPANFromJSON takes a JSON string and returns a pointer to a new PAN struct with vales from the JSON.
func (PAN) GetBillingAddress ¶
GetBillingAddress returns the billing address of the pan.
func (PAN) GetCardHolder ¶
GetCardHolder returns the card holder of the pan.
func (PAN) GetCardNumber ¶
GetCardNumber returns the card number of the pan.
func (PAN) GetExperationDate ¶
GetExperationDate returns the experation date of the pan.
func (*PAN) SetBillingAddress ¶
SetBillingAddress sets the billing address of the pan.
func (*PAN) SetCardHolder ¶
SetCardHolder sets the card holder of the pan.
func (*PAN) SetCardNumber ¶
SetCardNumber sets the card number of the pan.
func (*PAN) SetExperationDate ¶
SetExperationDate sets the experation date of the pan.