data

package
v0.0.0-...-c3ab6b1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package data provides an interface for creating and using different types of data, usually in the context of an MVC

Index

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 NewPAN

func NewPAN() *PAN

NewPAN returns a pointer to a new PAN struct.

func NewPANFromJSON

func NewPANFromJSON(newPan string) *PAN

NewPANFromJSON takes a JSON string and returns a pointer to a new PAN struct with vales from the JSON.

func (PAN) GetBillingAddress

func (pan PAN) GetBillingAddress() string

GetBillingAddress returns the billing address of the pan.

func (PAN) GetCardHolder

func (pan PAN) GetCardHolder() string

GetCardHolder returns the card holder of the pan.

func (PAN) GetCardNumber

func (pan PAN) GetCardNumber() string

GetCardNumber returns the card number of the pan.

func (PAN) GetExperationDate

func (pan PAN) GetExperationDate() time.Time

GetExperationDate returns the experation date of the pan.

func (PAN) GetID

func (pan PAN) GetID() string

GetID returns the ID of the pan.

func (*PAN) SetBillingAddress

func (pan *PAN) SetBillingAddress(newAddress string)

SetBillingAddress sets the billing address of the pan.

func (*PAN) SetCardHolder

func (pan *PAN) SetCardHolder(newCardHolder string)

SetCardHolder sets the card holder of the pan.

func (*PAN) SetCardNumber

func (pan *PAN) SetCardNumber(newCardNumber string)

SetCardNumber sets the card number of the pan.

func (*PAN) SetExperationDate

func (pan *PAN) SetExperationDate(newDate time.Time)

SetExperationDate sets the experation date of the pan.

func (*PAN) SetID

func (pan *PAN) SetID(newID string)

SetID sets the ID of the pan.

func (PAN) ToJSON

func (pan PAN) ToJSON() []byte

ToJSON converts a pan struct to a JSON string.

Jump to

Keyboard shortcuts

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