api

package
v2.1.0-preview.4.5+inc... Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: CC0-1.0 Imports: 17 Imported by: 39

Documentation

Index

Constants

View Source
const (
	// StatusIncomplete indicates that the submission is INCOMPLETE
	StatusIncomplete = "INCOMPLETE"
	// StatusSubmitted indicates that the submission is SUBMITTED
	StatusSubmitted = "SUBMITTED"
	// StatusKickback indicates that the submission is KICKBACK
	StatusKickback = "KICKBACK"
)
View Source
const (
	Certification  = "CER"
	MedicalRelease = "MEL"
	GeneralRelease = "REL"
	CreditRelease  = "FCR"
)

Attachment document types (dervied from e-QIP identifiers)

View Source
const (
	BasicAuthAudience    = "Basic"
	SingleSignOnAudience = "SSO"
)

Audience types used with Javascript Web Tokens.

BasicAuthAudience is used when basic authentication is used. SingleSignOnAudience is used when SAML/OAuth authentication is used.

View Source
const (
	LayoutAddress                             = "Address"
	LayoutBirthPlace                          = "Birthplace"
	LayoutBirthPlaceWithoutCounty             = "Birthplace without County"
	LayoutCountry                             = "Country"
	LayoutUSCityStateInternationalCity        = "US City, State, International city"
	LayoutUSCityStateInternationalCityCountry = "US City, State, International city country"
	LayoutState                               = "State"
	LayoutCityState                           = "City, State"
	LayoutStreetCityCountry                   = "Street, City, Country"
	LayoutCityCountry                         = "City, Country"
	LayoutUSCityStateZipcodeInternationalCity = "US City, State, Zipcode International city"
	LayoutCityStateCountry                    = "City, State, Country"
	LayoutUSAddress                           = "US Address"
	LayoutStreetCity                          = "Street, City"
	LayoutOffense                             = "Offense"
)

Different potential layouts used by the frontend. File: /src/components/Form/Location/Layouts.js

View Source
const (
	// Country elements with CountriesNoUS type
	LayoutBirthPlaceWithoutCountyNoUS = "Birthplace without County CountriesNoUS"
	LayoutBirthPlaceNoUS              = "Birthplace CountriesNoUS"
	// APOFPO elements
	LayoutMilitaryAddress       = "Military Address"
	LayoutPhysicalDomestic      = "PhysicalDomestic"
	LayoutPhysicalInternational = "PhysicalInternational"
)

Special layout flags for e-QIP integration for...

View Source
const (
	AccountLocked                              = "The account is currently locked"
	AccountUpdateError                         = "Not able to update account information"
	StatusError                                = "Unable to determine the status of the application"
	BasicAuthNotImplemented                    = "Basic authentication is not implemented"
	BasicAuthAttemptDenied                     = "An attempt for basic authentication was denied"
	BasicAuthError                             = "Failed to decode JSON for basic authentication"
	BasicAuthInvalid                           = "Basic authentication invalid"
	BasicAuthMissingPassword                   = "Basic authentication failed because missing a password"
	BasicAuthMissingUsername                   = "Basic authentication failed because missing a username"
	CORSDenied                                 = "CORS request denied"
	CookieDomainNotSet                         = "Cookie Domain is not set"
	EntityError                                = "Error getting entity data"
	EntitySaveError                            = "Error saving entity data"
	FormDecodingError                          = "Error serializing form"
	HashingFailure                             = "Error calculating hash"
	InvalidJWT                                 = "Invalid JSON web token"
	JWTError                                   = "Failed to generate JSON web token"
	JWTSecretNotSet                            = "JSON web token secret is not set"
	MiddlewareError                            = "Middleware has thrown an error"
	MigrationUnsupported                       = "Database migrations are not automated for Windows. Please manually execute the migrations."
	NoAccount                                  = "Unable to retrieve account"
	NoAuthorizationToken                       = "No authorization token header found"
	NoUsername                                 = "Unable to retrieve account because no username was provided"
	PayloadDeserializeError                    = "Failed to deserialize payload"
	PayloadEmpty                               = "Payload not provided"
	PayloadEntityError                         = "Error converting payload into valid entity"
	PayloadInvalid                             = "Payload is invalid"
	PayloadMissingType                         = "Payload is missing a type"
	PdfError                                   = "Error generating archival signature PDFs"
	RetrievingAccount                          = "Retrieving account"
	SamlNotImplemented                         = "SAML is not implemented"
	SamlAttemptDenied                          = "An attempt for SAML authentication was denied"
	SamlNotEnabled                             = "SAML is not enabled"
	SamlSLONotEnabled                          = "SAML SLO is not enabled"
	SamlFormError                              = "SAML response form value missing"
	SamlIdentifierMissing                      = "SAML attribute identifier missing"
	SamlInvalid                                = "SAML response invalid"
	SamlParseError                             = "Error parsing SAML response"
	SamlRequestError                           = "Error creating SAML authentication request"
	SamlRequestURLError                        = "Error creating SAML authentication request URL"
	SamlVerificationError                      = "Error verifying SAML response"
	SamlSLORequestGeneration                   = "Error generating SAML SLO Request"
	SamlSLOMissingSessionID                    = "Missing Session ID from AuthNResponse. WSO2 may be mis-configured"
	USPSDecodeError                            = "Error decoding USPS geocoding response"
	USPSKnownErrorCode                         = "USPS known error received"
	USPSMissingKey                             = "USPS API key has not been set"
	USPSRequestError                           = "Error executing USPS geocoding request"
	USPSUnknownErrorCode                       = "USPS known error received"
	WarnFailedMigration                        = "Failed to migrate database"
	WebserviceMissingURL                       = "Missing endpoint URL for web service"
	WebserviceMissingKey                       = "Missing private key for web service"
	WebserviceMissingCallerInfoAgencyID        = "Missing Caller Info Agency ID"
	WebserviceMissingCallerInfoAgencySSN       = "Missing Caller Info Agency SSN"
	WebserviceMissingCallerInfoAgencyPseudoSSN = "Missing Caller Info Agency Pseudo SSN"
	WebserviceCannotGenerateInboundXML         = "Unable to generate XML from Form Application Data"
	WebserviceCannotGetApplicationData         = "Unable to retrieve Form Application Data"
	WebserviceMissingAgencyID                  = "Missing Agency ID"
	WebserviceErrorCreatingImportRequest       = "Unable to create import request"
	TransmissionError                          = "Error transmitting package"
	TransmissionStorageError                   = "Failed to store transmission record"
	AttachmentsNotImplemented                  = "Attachments is not implemented"
	AttachmentDenied                           = "An attempt for attachments was denied"
	AttachmentNoFile                           = "No attachment file found in multipart form data"
	AttachmentCopyBufferError                  = "Could not copy file buffer"
	AttachmentNotSaved                         = "Attachment file failed to save in persistent storage"
	AttachmentNotDeleted                       = "Attachment file failed to delete"
	AttachmentNoID                             = "No identifier for attachment provided"
	AttachmentNotFound                         = "Attachment file not found"
	AttachmentSizeMismatch                     = "Attachment file size mismatch"
	AttachmentSizeExceeded                     = "Attachment file size exceeded maximum allowed"
	AttachmentTypeNotAllowed                   = "Attachment file type not allowed"
)

Warning messages

View Source
const (
	BasicAuthValid       = "Basic authentication validated"
	GeneratingPackage    = "Generating package for transmission"
	LoggedOut            = "Logged out"
	PurgeAccountData     = "Purging account data"
	SamlValid            = "SAML authentication validated"
	StartingServer       = "Starting server"
	StartingServerTLS    = "Starting server with HTTPS/TLS"
	StoppingServer       = "Stopping server"
	TransmissionRecorded = "Transmission recorded"
	TransmissionStarted  = "Transmission began"
	TransmissionStopped  = "Transmission ended"
	ValidatingJWT        = "Validating JSON web token"
	CORSIgnored          = "CORS ignoring OPTION method"
	WebRequest           = "Web server request received"
	JWTSecretSet         = "JSON web token secret is set"
	AttachmentSaved      = "Attachment saved"
	AttachmentDeleted    = "Attachment deleted"
	AttachmentDownloaded = "Attachment downloaded"
	CacheHeaders         = "Applying headers for caching"
)

Informative messages

View Source
const (
	// NodeEnv Sets the Node environment to configure the application for a specific uses:
	//
	//  - `test`: used with unit testing and code coverage
	//  - `development`: for use while developing the application
	//  - `staging`: environment for various usability tests prior to releasing to production
	//  - `production`: minify and optimize all possible assets for optimal use
	//
	// Target: Front-end (web)
	// Default: `development`
	// Values: `test` | `development` | `staging` | `production`
	NodeEnv = "NODE_ENV"

	// GolangEnv Sets the Go environment to configure the application for specific uses:
	//
	//  - `test`: used with unit testing and code coverage
	//  - `development`: for use while developing the application
	//  - `staging`: environment for various usability tests prior to releasing to production
	//  - `production`: compiled for production use only minimum required assets (does **not** include test accounts)
	//
	// Target: Back-end (api)
	// Default: `development`
	// Values: `test` | `development` | `staging` | `production`
	GolangEnv = "GOLANG_ENV"

	// LogLevel Log level for the back-end API. The default source for logging will be standard outputs (`stdout` and `stderr`).
	//
	// Target: Back-end (api)
	// Default: `warning`
	// Values: `debug` | `info` | `warning` | `error` | `fatal` | `panic`
	LogLevel = "LOG_LEVEL"

	// LogFile Path to the local file system log file.
	//
	// Logging to file may be used in conjunction with other logging sources.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	LogFile = "LOG_FILE"

	// LogDirectory Path to the local file system log file.
	//
	// Logging to file may be used in conjunction with other logging sources.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	LogDirectory = "LOG_DIRECTORY"

	// LogSyslog Connection string for a `syslog` server such as `udp://logserver:514`. Both TCP and UDP are supported.
	//
	// Logging to `syslog` may be used in conjunction with other logging sources.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	// Values: `{protocol}://{host}:{port}`
	LogSyslog = "LOG_SYSLOG"

	// LogSyslogCert Providing a path to the PEM certificate will convert all `syslog` communication to use TLS. Only TCP + TLS is supported making the connection string `tcp://logserver:514`.
	//
	// Logging to `syslog` may be used in conjunction with other logging sources.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	LogSyslogCert = "LOG_SYSLOG_CERT"

	// SessionTimeout Session timeout in minutes. Periods of inactivity falling outside of the threshold will be considered invalid and are required to be re-authenticated.
	//
	// Target: Back-end (api)
	// Default: `15`
	SessionTimeout = "SESSION_TIMEOUT"

	// APIRedirect Front-end URL for the back-end to redirect responses to. If this value is not set it will redirect to the same server host but on port 80.
	//
	// Target: Back-end (api)
	// Default: `{server_protocol}://{server_host}`
	APIRedirect = "API_REDIRECT"

	// APIBaseURL Back-end URL for the front-end to direct requests to.
	//
	// Target: Front-end (web), Back-end (api)
	// Default: `{server_protocol}://{server_host}:{server_port}/api`
	APIBaseURL = "API_BASE_URL"

	// Port Port to use for back-end API.
	//
	// Target: Back-end (api)
	// Default: `3000`
	Port = "PORT"

	// HashRouting Flag to enable hash routing. This should only be used in scenarios where push state is not an option.
	//
	// Target: Front-end (web)
	// Default: False: *empty*
	// Values: True: `1`, False: *empty*
	HashRouting = "HASH_ROUTING"

	// DbMigrationTarget Target a specific database migration step for example, `20180212130825_account_lock.sql`. By specifying a target then when migrations are ran it will try to step down **or** up until the target is reached. By not providing a value migrations will always attempt to go to the latest version.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	DbMigrationTarget = "DB_MIGRATION_TARGET"

	// DatabaseURI PostgreSQL database connection string. If a value is set do no set other database connection information.
	//
	// Target: Back-end (api)
	// Default: *none*
	// Values: `postgres://{db-username}:{db-password}@{db-host}:5432/{db-name}`
	DatabaseURI = "DATABASE_URI"

	// DatabaseUser PostgreSQL database user name.
	//
	// Target: Back-end (api)
	// Default: `postgres`
	DatabaseUser = "DATABASE_USER"

	// DatabasePassword PostgreSQL database password.
	//
	// Target: Back-end (api)
	// Default: *none*
	DatabasePassword = "DATABASE_PASSWORD"

	// DatabaseName PostgreSQL database instance name.
	//
	// Target: Back-end (api)
	// Default: `postgres`
	DatabaseName = "DATABASE_NAME"

	// DatabaseSSLMode The PostgreSQL sslmode to use to connect to the db
	//
	// Target: Back-end (api)
	// Default: `require`
	DatabaseSSLMode = "DATABASE_SSLMODE"

	// TestDatabaseName PostgreSQL database instance name for tests
	//
	// Target: Back-end (api)
	// Default: `eapp_test`
	TestDatabaseName = "TEST_DATABASE_NAME"

	// DatabaseHost PostgreSQL database host name and port.
	//
	// Target: Back-end (api)
	// Default: `localhost:5432`
	DatabaseHost = "DATABASE_HOST"

	// CORSAllowed Whitelist of address(es) for cross-origin resource sharing (CORS). CORS restricts resources (e.g. fonts, scripts, images) on a web page to be requested from another domain outside of the domain from which it is served.
	//
	// Examples
	//
	// | Type               | Example                            |
	// | ------------------ | ---------------------------------- |
	// | explicit           | http://localhost                   |
	// | multiple           | http://localhost;https://test\.com |
	// | wildcard           | *                                  |
	// | regular expression | https?://localhost                 |
	//
	// Target: Back-end (api)
	// Default: *empty*
	CORSAllowed = "CORS_ALLOWED"

	// CORSMaxAge The number of seconds browsers should cache preflight requests.
	//
	// Target: Back-end (api)
	// Default: `600`
	CORSMaxAge = "CORS_MAX_AGE"

	// FlushStorage Flag to enable flushing of persisted information for an account during the logon process.
	//
	// Target: Back-end (api)
	// Default: False: *empty*
	// Values: True: `1`, False: *empty*
	FlushStorage = "FLUSH_STORAGE"

	// UspsAPIKey United States Postal Service (USPS) API key for address validation.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	UspsAPIKey = "USPS_API_API_KEY"

	// JwtSecret The HS512 algorithm is used to sign each JavaScript Web Token using a secret random key of at least 512-bits. For example, `openssl rand 64 | base64 --wrap=0` generates an appropriate key. If this value is not specified, one will be automatically generated unique to the instance.
	//
	// Target: Back-end (api)
	// Default: *none*
	JwtSecret = "JWT_SECRET"

	// BasicEnabled Flag to enable basic username and password authentication.
	//
	// Target: Front-end (web), Back-end (api)
	// Default: False: *empty*
	// Values: True: `1`, False: *empty*
	BasicEnabled = "BASIC_ENABLED"

	// SamlEnabled Flag to enable SAML authentication.
	//
	// Target: Front-end (web), Back-end (api)
	// Default: False: *empty*
	// Values: True: `1`, False: *empty*
	SamlEnabled = "SAML_ENABLED"

	// SamlSloEnabled Flag to enable SAML single logout.
	//
	// Target: Front-end (web), Back-end (api)
	// Default: False: *empty*
	// Values: True: `1`, False: *empty*
	SamlSloEnabled = "SAML_SLO_ENABLED"

	// SamlPublicCert File path (absolute or relative) to SAML public certificate.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	SamlPublicCert = "SAML_PUBLIC_CERT"

	// SamlPrivateCert File path (absolute or relative) to SAML private certificate.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	SamlPrivateCert = "SAML_PRIVATE_CERT"

	// SamlIdpSsoURL Endpoint to SAML 2.0 Single Sign-On (SSO) identity provider. The client will be redirected to this URL to complete the authentication process. This value will be provided by the IdAM configuration settings.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	SamlIdpSsoURL = "SAML_IDP_SSO_URL"

	// SamlIdpSsoDescURL The identity provider's issuer URL. This value will be provided by the IdAM configuration settings.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	SamlIdpSsoDescURL = "SAML_IDP_SSO_DESC_URL"

	// SamlIdpPublicCert File path (absolute or relative) to identity data provider's public certificate (X.509 PEM) used to verify the authentication response signature. This certificate will be provided by the IdAM solution.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	SamlIdpPublicCert = "SAML_IDP_PUBLIC_CERT"

	// SamlSignRequest Flag to enable signing of SAML 2.0 requests.
	//
	// Target: Back-end (api)
	// Default: False: *empty*
	// Values: True: `1`, False: *empty*
	SamlSignRequest = "SAML_SIGN_REQUEST"

	// SamlVerifyInsecure Flag to allow insecure validation of SAML 2.0 responses.
	//
	// Target: Back-end (api)
	// Default: False: *empty*
	// Values: True: `1`, False: *empty*
	SamlVerifyInsecure = "SAML_VERIFY_INSECURE"

	// SamlConsumerServiceURL Endpoint for assertion consumer service. After authentication is completed the customer will be redirected to this endpoint for local processes to verify and handle the response.
	//
	// Target: Back-end (api)
	// Default: `{API_BASE_URL}/auth/saml/callback`
	SamlConsumerServiceURL = "SAML_CONSUMER_SERVICE_URL"

	// TLSCert File path (absolute or relative) to TLS public certificate (X.509 PEM) certificate for use with the back-end API.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	TLSCert = "TLS_CERT"

	// TLSKey File path (absolute or relative) to TLS private key (X.509 PEM) for use the back-end API.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	TLSKey = "TLS_KEY"

	// WsEnabled Allows requests to be made to the eqip web service.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	WsEnabled = "WS_ENABLED"

	// WsURL The endpoint for the OPM web service used to submit the package for investigation.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	WsURL = "WS_URL"

	// WsKey File path to private certificate key (PKCS#8 DER) used to sign security tokens for the OPM web service.
	//
	// Target: Back-end (api)
	// Default: *not enabled*
	WsKey = "WS_KEY"

	// WsCallerinfoAgencyID Provided by OPM representing the caller's agency.
	//
	// Target: Back-end (api)
	// Default: *empty*
	WsCallerinfoAgencyID = "WS_CALLERINFO_AGENCY_ID"

	// WsCallerinfoAgencyUserSSN Provided by OPM representing the caller's agency user making the web service call. The value **should not** be a valid SSN.
	//
	// Target: Back-end (api)
	// Default: *empty*
	WsCallerinfoAgencyUserSSN = "WS_CALLERINFO_AGENCY_USER_SSN"

	// WsCallerinfoAgencyUserPseudossn Flag representing whether or not the caller has an SSN.
	//
	// Target: Back-end (api)
	// Default: *empty*
	// Values: True: `1`, False: `0`
	WsCallerinfoAgencyUserPseudossn = "WS_CALLERINFO_AGENCY_USER_PSEUDOSSN"

	// WsAgencyID Provided by OPM representing the destination agency.
	//
	// Target: Back-end (api)
	// Default: *empty*
	WsAgencyID = "WS_AGENCY_ID"

	// WsAgencyGroupID Provided by OPM representing the destination agency's group.
	//
	// Target: Back-end (api)
	// Default: *empty*
	WsAgencyGroupID = "WS_AGENCY_GROUP_ID"

	// AttachmentsEnabled Flag representing whether or not attachments are allowed.
	//
	// Target: Front-end (web), Back-end (api)
	// Default: True: `1`
	// Values: True: `1`, False: *empty*
	AttachmentsEnabled = "ATTACHMENTS_ENABLED"

	// FileMaximumSize Is the maximum file size of an attachment allowed in bytes.
	//
	// Target: Front-end (web), Back-end (api)
	// Default: 5000000
	FileMaximumSize = "FILE_MAXIMUM_SIZE"

	// FileTypes Allowed file types of an attachment.
	//
	// Target: Front-end (web), Back-end (api)
	// Default: ".tiff;.png;.pdf"
	FileTypes = "FILE_TYPES"
)

Variables

View Source
var (
	// ErrPasswordDoesNotMatch is an error when a user inputs an invalid password
	ErrPasswordDoesNotMatch = errors.New("Password does not match")

	// ErrAccountDoesNotExist is an error when a users account does not exist
	ErrAccountDoesNotExist = errors.New("Account does not exist")

	// ErrDatastoreConnection is an error when a database connection cannot be made
	ErrDatastoreConnection = errors.New("Unable to connect to datastore")
)
View Source
var (
	// ErrApplicationDoesNotExist is an error when a given application does not exist
	ErrApplicationDoesNotExist = errors.New("Application does not exist")

	// ErrApplicationAlreadyExists is an error when a given application does not exist
	ErrApplicationAlreadyExists = errors.New("Application already exists")

	// ErrAttachmentDoesNotExist is returned when the requested attchment does not exist.
	// Note: this could mean that you requested a valid ID but for a different user.
	ErrAttachmentDoesNotExist = errors.New("Attachment does not exist")
)

Functions

func DefaultFormVersion

func DefaultFormVersion(formType string) (string, error)

DefaultFormVersion returns the most recent form version for the given formType

func EqipClient added in v1.0.12

func EqipClient(env Settings) (*eqip.Client, error)

EqipClient returns a new eqip.Client, configured with the WS_* environment variables.

func EqipRequest added in v1.0.12

func EqipRequest(env Settings, application map[string]interface{}, xmlContent string) (*eqip.ImportRequest, error)

EqipRequest returns a new eqip.ImportRequest, configured with the WS_* environment variables.

func GetFormMetadata added in v1.0.14

func GetFormMetadata(context DatabaseService, accountID int) (map[string]string, error)

GetFormMetadata returns the metadata for the form

func IsDatabaseErrorNotFound added in v1.0.14

func IsDatabaseErrorNotFound(err error) bool

IsDatabaseErrorNotFound returns true if the error is a DatabaseErrorNotFound error

Types

type Account added in v0.5.3

type Account struct {
	ID          int
	Username    string
	Firstname   string
	Lastname    string
	Token       string
	TokenUsed   bool
	Email       string
	Status      string
	FormType    string `db:"form_type"`
	FormVersion string `db:"form_version"`
	ExternalID  string `db:"external_id"` // ExternalID is an identifier used by external systems to id applications
}

Account represents a user account

func (*Account) BasicAuthentication added in v0.5.3

func (entity *Account) BasicAuthentication(context DatabaseService, password string) error

BasicAuthentication checks if the username and password are valid and returns the users account

func (*Account) CanKickback

func (entity *Account) CanKickback() bool

CanKickback returns wether the account is in a valid state for kickback

func (*Account) CanSubmit

func (entity *Account) CanSubmit() bool

CanSubmit returns wether the account is in a valid state for submission

func (*Account) Delete added in v0.5.3

func (entity *Account) Delete(context DatabaseService, account int) (int, error)

Delete the Account entity.

func (*Account) Find added in v0.5.3

func (entity *Account) Find(context DatabaseService) error

Find will search for account by `username` if no identifier is present or by ID if it is.

func (*Account) FindByExternalID

func (entity *Account) FindByExternalID(context DatabaseService) error

FindByExternalID will search for account by `request id`

func (*Account) FormTypeIsKnown added in v1.0.14

func (entity *Account) FormTypeIsKnown() bool

FormTypeIsKnown returns wether the form type and version are known to eApp

func (*Account) Get added in v0.5.3

func (entity *Account) Get(context DatabaseService, account int) (int, error)

Get the Account entity.

func (*Account) GetID added in v0.5.3

func (entity *Account) GetID() int

GetID returns the entity identifier.

func (*Account) Kickback

func (entity *Account) Kickback() bool

Kickback will mark the account in a `KICKBACK` status.

func (*Account) Save added in v0.5.3

func (entity *Account) Save(context DatabaseService, account int) (int, error)

Save the Account entity.

func (*Account) SetID added in v0.5.3

func (entity *Account) SetID(id int)

SetID sets the entity identifier.

func (*Account) Submit

func (entity *Account) Submit() bool

Submit will mark the account in a `SUBMITTED` status.

func (*Account) Unsubmit

func (entity *Account) Unsubmit()

Unsubmit will mark the account in a `INCOMPLETE` status. This will likely be for debugging purposes only.

type Application added in v0.5.3

type Application struct {
	AccountID int
	// contains filtered or unexported fields
}

Application represents a single SF application

func BlankApplication

func BlankApplication(accountID int, formType string, formVersion string) Application

BlankApplication returns a constructed Application

func (*Application) ClearNoBranches

func (a *Application) ClearNoBranches() error

ClearNoBranches clears all the branches answered "No" that must be re answered after rejection

func (*Application) Hash

func (a *Application) Hash() (string, error)

Hash returns the SHA256 hash of the application state in hexadecimal

func (Application) MarshalJSON

func (a Application) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaller to custom marshal our JSON.

func (Application) Section

func (a Application) Section(identifier string) Section

Section returns a single section of the application, by identifier

func (*Application) SetSection

func (a *Application) SetSection(section Section)

SetSection sets a section in the application

func (*Application) UnmarshalJSON

func (a *Application) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaller

type ArchivalPdf added in v0.5.6

type ArchivalPdf struct {
	Name     string // document type name shown to users (e.g, Certification, Medical Release, etc.)
	Template string // filename of PDF template that will be populated
	Section  string // eApp sub-section where signature information is stored
	DocType  string // document type derived from e-QIP (e.g., CER, MEL, etc.)
}

An ArchivalPdf represents a PDF (Portable Document Format) file that needs to be retained and submitted to e-QIP.

type Attachment added in v0.5.3

type Attachment struct {
	ID          int    `json:"id"`
	AccountID   int    `json:"-"`
	Description string `json:"description"`
	Filename    string `json:"filename"`
	Size        int64  `json:"size"`
	DocType     string `json:"docType"`
	Raw         []byte `json:"-"`
}

Attachment stores information in regards to a file associated with the application.

func (*Attachment) Marshal added in v0.5.3

func (entity *Attachment) Marshal() Payload

Marshal to payload structure

func (*Attachment) Unmarshal added in v0.5.3

func (entity *Attachment) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Attachment) Valid added in v0.5.3

func (entity *Attachment) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type BasicAuthMembership added in v0.5.3

type BasicAuthMembership struct {
	ID           int
	AccountID    int
	Account      *Account
	PasswordHash string
	Created      time.Time
}

BasicAuthMembership stores basic authentication information for the account.

func (*BasicAuthMembership) Delete added in v0.5.3

func (entity *BasicAuthMembership) Delete(context DatabaseService, account int) (int, error)

Delete the basic membership.

func (*BasicAuthMembership) Find added in v0.5.3

func (entity *BasicAuthMembership) Find(context DatabaseService) error

Find the basic membership.

func (*BasicAuthMembership) Get added in v0.5.3

func (entity *BasicAuthMembership) Get(context DatabaseService, account int) (int, error)

Get the basic membership.

func (*BasicAuthMembership) GetID added in v0.5.3

func (entity *BasicAuthMembership) GetID() int

GetID returns the entity identifier.

func (*BasicAuthMembership) HashPassword added in v0.5.3

func (entity *BasicAuthMembership) HashPassword(password string) error

HashPassword converts a plaintext password and generates a hash and updates the `PasswordHash` value.

func (*BasicAuthMembership) PasswordMatch added in v0.5.3

func (entity *BasicAuthMembership) PasswordMatch(password string) bool

PasswordMatch determines if a plain text password matches its equivalent password hash.

func (*BasicAuthMembership) Save added in v0.5.3

func (entity *BasicAuthMembership) Save(context DatabaseService, account int) (int, error)

Save the basic membership.

func (*BasicAuthMembership) SetID added in v0.5.3

func (entity *BasicAuthMembership) SetID(id int)

SetID sets the entity identifier.

type Benefit added in v0.5.3

type Benefit struct {
	PayloadBegin                         Payload `json:"Began,omitempty" sql:"-"`
	PayloadEnd                           Payload `json:"End,omitempty" sql:"-"`
	PayloadFrequency                     Payload `json:"Frequency,omitempty" sql:"-"`
	PayloadOtherFrequency                Payload `json:"OtherFrequency,omitempty" sql:"-"`
	PayloadOtherFrequencyTypeExplanation Payload `json:"OtherFrequencyTypeExplanation,omitempty" sql:"-"`
	PayloadReceived                      Payload `json:"Received,omitempty" sql:"-"`
	PayloadCountry                       Payload `json:"Country" sql:"-"`
	PayloadValue                         Payload `json:"Value" sql:"-"`
	PayloadValueEstimated                Payload `json:"ValueEstimated" sql:"-"`
	PayloadReason                        Payload `json:"Reason" sql:"-"`
	PayloadObligated                     Payload `json:"Obligated" sql:"-"`
	PayloadObligatedExplanation          Payload `json:"ObligatedExplanation" sql:"-"`

	// Validator specific fields
	Begin                         *DateControl `json:"-"`
	End                           *DateControl `json:"-"`
	Frequency                     *Radio       `json:"-"`
	OtherFrequency                *Textarea    `json:"-"`
	OtherFrequencyTypeExplanation *Textarea    `json:"-"`
	Received                      *DateControl `json:"-"`
	Country                       *Country     `json:"-"`
	Value                         *Number      `json:"-"`
	ValueEstimated                *Checkbox    `json:"-"`
	Reason                        *Textarea    `json:"-"`
	Obligated                     *Branch      `json:"-"`
	ObligatedExplanation          *Textarea    `json:"-"`

	// Persister specific fields
	ID                              int `json:"-"`
	AccountID                       int `json:"-"`
	BeginID                         int `json:"-" pg:",fk:Begin"`
	EndID                           int `json:"-" pg:",fk:End"`
	FrequencyID                     int `json:"-" pg:",fk:Frequency"`
	OtherFrequencyID                int `json:"-" pg:",fk:OtherFrequency"`
	OtherFrequencyTypeExplanationID int `json:"-" pg:",fk:OtherFrequencyTypeExplanation"`
	ReceivedID                      int `json:"-" pg:",fk:Received"`
	CountryID                       int `json:"-" pg:",fk:Country"`
	ValueID                         int `json:"-" pg:",fk:Value"`
	ValueEstimatedID                int `json:"-" pg:",fk:ValueEstimated"`
	ReasonID                        int `json:"-" pg:",fk:Reason"`
	ObligatedID                     int `json:"-" pg:",fk:Obligated"`
	ObligatedExplanationID          int `json:"-" pg:",fk:ObligatedExplanation"`
}

Benefit payload type.

func (*Benefit) Marshal added in v0.5.3

func (entity *Benefit) Marshal() Payload

Marshal to payload structure

func (*Benefit) Unmarshal added in v0.5.3

func (entity *Benefit) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Benefit) Valid added in v0.5.3

func (entity *Benefit) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Branch added in v0.5.3

type Branch struct {
	ID    int    `json:"-"`
	Value string `json:"value"`
}

Branch is a basic yes/no input.

func (*Branch) ClearNo

func (entity *Branch) ClearNo()

ClearNo resets a "no" answer to unset

func (*Branch) Marshal added in v0.5.3

func (entity *Branch) Marshal() Payload

Marshal to payload structure

func (*Branch) Unmarshal added in v0.5.3

func (entity *Branch) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Branch) Valid added in v0.5.3

func (entity *Branch) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Checkbox added in v0.5.3

type Checkbox struct {
	ID      int    `json:"-"`
	Value   string `json:"value"`
	Checked bool   `json:"checked,omitempty"`
}

Checkbox is a basic input.

func (*Checkbox) Marshal added in v0.5.3

func (entity *Checkbox) Marshal() Payload

Marshal to payload structure

func (*Checkbox) Unmarshal added in v0.5.3

func (entity *Checkbox) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Checkbox) Valid added in v0.5.3

func (entity *Checkbox) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type CheckboxGroup added in v0.5.3

type CheckboxGroup struct {
	ID     int      `json:"-"`
	Values []string `json:"values"`
}

CheckboxGroup is a basic input.

func (*CheckboxGroup) Marshal added in v0.5.3

func (entity *CheckboxGroup) Marshal() Payload

Marshal to payload structure

func (*CheckboxGroup) Unmarshal added in v0.5.3

func (entity *CheckboxGroup) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*CheckboxGroup) Valid added in v0.5.3

func (entity *CheckboxGroup) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type CitizenshipMultiple added in v0.5.3

type CitizenshipMultiple struct {
	PayloadHasMultiple Payload `json:"HasMultiple" sql:"-"`
	PayloadList        Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasMultiple *Branch     `json:"-"`
	List        *Collection `json:"-"`

	// Persister specific fields
	ID            int `json:"-"`
	HasMultipleID int `json:"-" pg:", fk:HasMultiple"`
	ListID        int `json:"-" pg:", fk:List"`
}

CitizenshipMultiple represents the payload for the citizenship multiple section.

func (*CitizenshipMultiple) ClearNoBranches

func (entity *CitizenshipMultiple) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*CitizenshipMultiple) Marshal added in v0.5.3

func (entity *CitizenshipMultiple) Marshal() Payload

Marshal to payload structure

func (*CitizenshipMultiple) Unmarshal added in v0.5.3

func (entity *CitizenshipMultiple) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*CitizenshipMultiple) Valid added in v0.5.3

func (entity *CitizenshipMultiple) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type CitizenshipPassports added in v0.5.3

type CitizenshipPassports struct {
	PayloadPassports Payload `json:"Passports" sql:"-"`

	// Validator specific fields
	Passports *Collection `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	PassportsID int `json:"-" pg:", fk:Passports"`
}

CitizenshipPassports represents the payload for the citizenship passports section.

func (*CitizenshipPassports) ClearNoBranches

func (entity *CitizenshipPassports) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*CitizenshipPassports) Marshal added in v0.5.3

func (entity *CitizenshipPassports) Marshal() Payload

Marshal to payload structure

func (*CitizenshipPassports) Unmarshal added in v0.5.3

func (entity *CitizenshipPassports) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*CitizenshipPassports) Valid added in v0.5.3

func (entity *CitizenshipPassports) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type CitizenshipStatus added in v0.5.3

type CitizenshipStatus struct {
	PayloadCitizenshipStatus           Payload `json:"CitizenshipStatus" sql:"-"`
	PayloadAbroadDocumentation         Payload `json:"AbroadDocumentation" sql:"-"`
	PayloadExplanation                 Payload `json:"Explanation" sql:"-"`
	PayloadDocumentNumber              Payload `json:"DocumentNumber" sql:"-"`
	PayloadDocumentIssued              Payload `json:"DocumentIssued" sql:"-"`
	PayloadDocumentName                Payload `json:"DocumentName" sql:"-"`
	PayloadDocumentExpiration          Payload `json:"DocumentExpiration" sql:"-"`
	PayloadDocumentType                Payload `json:"DocumentType" sql:"-"`
	PayloadPlaceIssued                 Payload `json:"PlaceIssued" sql:"-"`
	PayloadCertificateNumber           Payload `json:"CertificateNumber" sql:"-"`
	PayloadCertificateIssued           Payload `json:"CertificateIssued" sql:"-"`
	PayloadCertificateName             Payload `json:"CertificateName" sql:"-"`
	PayloadCertificateCourtName        Payload `json:"CertificateCourtName" sql:"-"`
	PayloadCertificateCourtAddress     Payload `json:"CertificateCourtAddress" sql:"-"`
	PayloadBornOnMilitaryInstallation  Payload `json:"BornOnMilitaryInstallation" sql:"-"`
	PayloadMilitaryBase                Payload `json:"MilitaryBase" sql:"-"`
	PayloadEntryDate                   Payload `json:"EntryDate" sql:"-"`
	PayloadEntryLocation               Payload `json:"EntryLocation" sql:"-"`
	PayloadPriorCitizenship            Payload `json:"PriorCitizenship" sql:"-"`
	PayloadHasAlienRegistration        Payload `json:"HasAlienRegistration" sql:"-"`
	PayloadAlienRegistrationNumber     Payload `json:"AlienRegistrationNumber" sql:"-"`
	PayloadAlienRegistrationExpiration Payload `json:"AlienRegistrationExpiration" sql:"-"`
	PayloadBasis                       Payload `json:"Basis" sql:"-"`
	PayloadPermanentResidentCardNumber Payload `json:"PermanentResidentCardNumber" sql:"-"`
	PayloadResidenceStatus             Payload `json:"ResidenceStatus" sql:"-"`

	// Validator specific fields
	CitizenshipStatus           *Radio       `json:"-"`
	AbroadDocumentation         *Radio       `json:"-"`
	Explanation                 *Textarea    `json:"-"`
	DocumentNumber              *Text        `json:"-"`
	DocumentIssued              *DateControl `json:"-"`
	DocumentName                *Name        `json:"-"`
	DocumentExpiration          *DateControl `json:"-"`
	DocumentType                *Radio       `json:"-"`
	PlaceIssued                 *Location    `json:"-"`
	CertificateNumber           *Text        `json:"-"`
	CertificateIssued           *DateControl `json:"-"`
	CertificateName             *Name        `json:"-"`
	CertificateCourtName        *Text        `json:"-"`
	CertificateCourtAddress     *Location    `json:"-"`
	BornOnMilitaryInstallation  *Branch      `json:"-"`
	MilitaryBase                *Text        `json:"-"`
	EntryDate                   *DateControl `json:"-"`
	EntryLocation               *Location    `json:"-"`
	PriorCitizenship            *Country     `json:"-"`
	HasAlienRegistration        *Branch      `json:"-"`
	AlienRegistrationNumber     *Text        `json:"-"`
	AlienRegistrationExpiration *DateControl `json:"-"`
	Basis                       *Radio       `json:"-"`
	PermanentResidentCardNumber *Text        `json:"-"`
	ResidenceStatus             *Text        `json:"-"`

	// Persister specific fields
	ID                            int `json:"-"`
	CitizenshipStatusID           int `json:"-" pg:", fk:CitizenshipStatus"`
	AbroadDocumentationID         int `json:"-" pg:", fk:AbroadDocumentation"`
	ExplanationID                 int `json:"-" pg:", fk:Explanation"`
	DocumentNumberID              int `json:"-" pg:", fk:DocumentNumber"`
	DocumentIssuedID              int `json:"-" pg:", fk:DocumentIssued"`
	DocumentNameID                int `json:"-" pg:", fk:DocumentName"`
	DocumentExpirationID          int `json:"-" pg:", fk:DocumentExpiration"`
	DocumentTypeID                int `json:"-" pg:", fk:DocumentType"`
	PlaceIssuedID                 int `json:"-" pg:", fk:PlaceIssued"`
	CertificateNumberID           int `json:"-" pg:", fk:CertificateNumber"`
	CertificateIssuedID           int `json:"-" pg:", fk:CertificateIssued"`
	CertificateNameID             int `json:"-" pg:", fk:CertificateName"`
	CertificateCourtNameID        int `json:"-" pg:", fk:CertificateCourtName"`
	CertificateCourtAddressID     int `json:"-" pg:", fk:CertificateCourtAddress"`
	BornOnMilitaryInstallationID  int `json:"-" pg:", fk:BornOnMilitaryInstallation"`
	MilitaryBaseID                int `json:"-" pg:", fk:MilitaryBase"`
	EntryDateID                   int `json:"-" pg:", fk:EntryDate"`
	EntryLocationID               int `json:"-" pg:", fk:EntryLocation"`
	PriorCitizenshipID            int `json:"-" pg:", fk:PriorCitizenship"`
	HasAlienRegistrationID        int `json:"-" pg:", fk:HasAlienRegistration"`
	AlienRegistrationNumberID     int `json:"-" pg:", fk:AlienRegistrationNumber"`
	AlienRegistrationExpirationID int `json:"-" pg:", fk:AlienRegistrationExpiration"`
	BasisID                       int `json:"-" pg:", fk:Basis"`
	PermanentResidentCardNumberID int `json:"-" pg:", fk:PermanentResidentCardNumber"`
	ResidenceStatusID             int `json:"-" pg:", fk:ResidenceStatus"`
}

CitizenshipStatus represents the payload for the citizenship status section.

func (*CitizenshipStatus) ClearNoBranches

func (entity *CitizenshipStatus) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*CitizenshipStatus) Marshal added in v0.5.3

func (entity *CitizenshipStatus) Marshal() Payload

Marshal to payload structure

func (*CitizenshipStatus) Unmarshal added in v0.5.3

func (entity *CitizenshipStatus) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*CitizenshipStatus) Valid added in v0.5.3

func (entity *CitizenshipStatus) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type CivilUnion added in v0.5.3

type CivilUnion struct {
	PayloadAddress                       Payload `json:"Address" sql:"-"`
	PayloadAddressSeparated              Payload `json:"AddressSeparated" sql:"-"`
	PayloadAddressSeparatedNotApplicable Payload `json:"AddressSeparatedNotApplicable" sql:"-"`
	PayloadAlternateAddress              Payload `json:"AlternateAddress" sql:"-"`
	PayloadBirthPlace                    Payload `json:"BirthPlace" sql:"-"`
	PayloadBirthdate                     Payload `json:"Birthdate" sql:"-"`
	PayloadCitizenship                   Payload `json:"Citizenship" sql:"-"`
	PayloadDateSeparated                 Payload `json:"DateSeparated" sql:"-"`
	PayloadDivorced                      Payload `json:"Divorced" sql:"-"`
	PayloadEmail                         Payload `json:"Email" sql:"-"`
	PayloadEmailNotApplicable            Payload `json:"EmailNotApplicable" sql:"-"`
	PayloadEnteredCivilUnion             Payload `json:"EnteredCivilUnion" sql:"-"`
	PayloadForeignBornDocument           Payload `json:"ForeignBornDocument" sql:"-"`
	PayloadLocation                      Payload `json:"Location" sql:"-"`
	PayloadName                          Payload `json:"Name" sql:"-"`
	PayloadOtherNames                    Payload `json:"OtherNames" sql:"-"`
	PayloadSSN                           Payload `json:"SSN" sql:"-"`
	PayloadSeparated                     Payload `json:"Separated" sql:"-"`
	PayloadTelephone                     Payload `json:"Telephone" sql:"-"`
	PayloadUseCurrentAddress             Payload `json:"UseCurrentAddress" sql:"-"`

	// Validator specific fields
	Address                       *Location            `json:"-"`
	AddressSeparated              *Location            `json:"-"`
	AddressSeparatedNotApplicable *NotApplicable       `json:"-"`
	AlternateAddress              *PhysicalAddress     `json:"-"`
	BirthPlace                    *Location            `json:"-"`
	Birthdate                     *DateControl         `json:"-"`
	Citizenship                   *Country             `json:"-"`
	DateSeparated                 *DateControl         `json:"-"`
	Divorced                      *Branch              `json:"-"`
	Email                         *Email               `json:"-"`
	EmailNotApplicable            *NotApplicable       `json:"-"`
	EnteredCivilUnion             *DateControl         `json:"-"`
	ForeignBornDocument           *ForeignBornDocument `json:"-"`
	Location                      *Location            `json:"-"`
	Name                          *Name                `json:"-"`
	OtherNames                    *Collection          `json:"-"`
	SSN                           *SSN                 `json:"-" sql:"-"`
	Separated                     *Branch              `json:"-"`
	Telephone                     *Telephone           `json:"-"`
	UseCurrentAddress             *NotApplicable       `json:"-"`

	// Persister specific fields
	ID                              int `json:"-" sql:",pk"`
	AccountID                       int `json:"-" sql:",pk"`
	AddressID                       int `json:"-"`
	AddressSeparatedID              int `json:"-"`
	AddressSeparatedNotApplicableID int `json:"-"`
	AlternateAddressID              int `json:"-"`
	BirthPlaceID                    int `json:"-"`
	BirthdateID                     int `json:"-"`
	CitizenshipID                   int `json:"-"`
	DateSeparatedID                 int `json:"-"`
	DivorcedID                      int `json:"-"`
	EmailID                         int `json:"-"`
	EmailNotApplicableID            int `json:"-"`
	EnteredCivilUnionID             int `json:"-"`
	ForeignBornDocumentID           int `json:"-"`
	LocationID                      int `json:"-"`
	NameID                          int `json:"-"`
	OtherNamesID                    int `json:"-"`
	SSNID                           int `json:"-"`
	SeparatedID                     int `json:"-"`
	TelephoneID                     int `json:"-"`
	UseCurrentAddressID             int `json:"-"`
}

CivilUnion is an item of named payloads.

func (*CivilUnion) Marshal added in v0.5.3

func (entity *CivilUnion) Marshal() Payload

Marshal to payload structure

func (*CivilUnion) Unmarshal added in v0.5.3

func (entity *CivilUnion) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*CivilUnion) Valid added in v0.5.3

func (entity *CivilUnion) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ClearanceLevel added in v0.5.3

type ClearanceLevel struct {
	PayloadLevel       Payload `json:"Level" sql:"-"`
	PayloadExplanation Payload `json:"Explanation" sql:"-"`

	// Validator specific fields
	Level       *Radio    `json:"-"`
	Explanation *Textarea `json:"-"`

	// Persister specific fields
	ID            int `json:"-"`
	AccountID     int `json:"-"`
	LevelID       int `json:"-"`
	ExplanationID int `json:"-"`
}

ClearanceLevel is a basic input.

func (*ClearanceLevel) Marshal added in v0.5.3

func (entity *ClearanceLevel) Marshal() Payload

Marshal to payload structure

func (*ClearanceLevel) Unmarshal added in v0.5.3

func (entity *ClearanceLevel) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ClearanceLevel) Valid added in v0.5.3

func (entity *ClearanceLevel) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type CoOwners added in v0.5.3

type CoOwners struct {
	PayloadList Payload `json:"List" sql:"-"`

	// Validator specific fields
	List *Collection `json:"-"`

	// Persister specific fields
	ID        int `json:"-"`
	AccountID int `json:"-"`
	ListID    int `json:"-"`
}

CoOwners payload.

func (*CoOwners) Marshal added in v0.5.3

func (entity *CoOwners) Marshal() Payload

Marshal to payload structure

func (*CoOwners) Unmarshal added in v0.5.3

func (entity *CoOwners) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*CoOwners) Valid added in v0.5.3

func (entity *CoOwners) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Collection added in v0.5.3

type Collection struct {
	PayloadBranch Payload `json:"branch" sql:"-"`

	// Validator specific fields
	Branch *Branch           `json:"-" sql:"-"`
	Items  []*CollectionItem `json:"items" sql:"-"`

	// Persister specific fields
	ID        int `json:"-"`
	AccountID int `json:"-"`
	BranchID  int `json:"-" pg:",fk:Branch"`
}

Collection represents a structure composed of zero or more items.

func (*Collection) ClearBranchItemsNo

func (entity *Collection) ClearBranchItemsNo(firstKey string, additionalKeys ...string) error

ClearBranchItemsNo goes through every item in the collection, pulls out all the branches with the given name and clears the no

func (*Collection) ClearBranchNo

func (entity *Collection) ClearBranchNo()

ClearBranchNo clears the no of the list's branch This is a convience wrapper that checks nil first.

func (*Collection) ClearNestedHasNo

func (entity *Collection) ClearNestedHasNo(itemName string) error

ClearNestedHasNo goes through all the items in the collection, pulls out the named nested collection and clears its Has' No

func (*Collection) Find added in v0.5.3

func (entity *Collection) Find(context DatabaseService) error

Find the previous entity stored if one is available.

func (*Collection) Marshal added in v0.5.3

func (entity *Collection) Marshal() Payload

Marshal to payload structure

func (*Collection) Unmarshal added in v0.5.3

func (entity *Collection) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Collection) Valid added in v0.5.3

func (entity *Collection) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type CollectionItem added in v0.5.3

type CollectionItem struct {
	Item map[string]json.RawMessage `json:"Item" sql:"-"`

	ID     int    `json:"-" sql:",pk"`
	Index  int    `json:"-" sql:",pk"`
	Name   string `json:"-" sql:",pk"`
	Type   string `json:"-"`
	ItemID int    `json:"-"`
}

CollectionItem is an item of named payloads directly used in a `Collection`.

func (CollectionItem) Each added in v0.5.3

func (ci CollectionItem) Each(action func(string, string, Entity, error) error) error

Each loops through each entity in the collection item performing a given action

func (CollectionItem) GetItemValue

func (ci CollectionItem) GetItemValue(key string) (Entity, error)

GetItemValue returns the entity stored at the key in the collection item

func (*CollectionItem) SetItemValue

func (ci *CollectionItem) SetItemValue(key string, value Entity) error

SetItemValue sets a value for a key in the CollectionItem

func (*CollectionItem) Valid added in v0.5.3

func (ci *CollectionItem) Valid() (bool, error)

Valid iterates through each named property of an item validating each payload.

type Contacts added in v0.5.3

type Contacts struct {
	PayloadList Payload `json:"List" sql:"-"`

	// Validator specific fields
	List *Collection `json:"-"`

	// Persister specific fields
	ID        int `json:"-"`
	AccountID int `json:"-"`
	ListID    int `json:"-"`
}

Contacts payload.

func (*Contacts) Marshal added in v0.5.3

func (entity *Contacts) Marshal() Payload

Marshal to payload structure

func (*Contacts) Unmarshal added in v0.5.3

func (entity *Contacts) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Contacts) Valid added in v0.5.3

func (entity *Contacts) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Country added in v0.5.3

type Country struct {
	ID       int      `json:"-"`
	Value    []string `json:"value" pg:",array"`
	Comments string   `json:"comments,omitempty"`
}

Country is a basic input.

func (*Country) Marshal added in v0.5.3

func (entity *Country) Marshal() Payload

Marshal to payload structure

func (*Country) Unmarshal added in v0.5.3

func (entity *Country) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Country) Valid added in v0.5.3

func (entity *Country) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type DatabaseErrorNotFound added in v1.0.14

type DatabaseErrorNotFound string

DatabaseErrorNotFound is an error that indicates that the function failed because the seach returned zero results. It is expected to be returned by Select et al.

func (DatabaseErrorNotFound) Error added in v1.0.14

func (d DatabaseErrorNotFound) Error() string

type DatabaseService added in v0.5.3

type DatabaseService interface {
	Raw(query interface{}, params ...interface{}) error
	Find(query interface{}, callback func(query interface{}))
	FindAll(model interface{}) error
	Where(model interface{}, condition string, params ...interface{}) error
	ColumnsWhere(model interface{}, columns []string, condition string, params ...interface{}) error
	Insert(query ...interface{}) error
	Update(query interface{}) error
	Save(query ...interface{}) error
	Delete(query interface{}) error
	Select(query interface{}) error
	Count(model interface{}, condition string, params ...interface{}) int
	CountExpr(model interface{}, expr string, retval interface{}, condition string, params ...interface{})
	Array(model interface{}, expr string, retval interface{}, condition string, params ...interface{})
}

DatabaseService represents a persisted data storage.

type DateControl added in v0.5.3

type DateControl struct {
	ID        int    `json:"-"`
	Month     string `json:"month"`
	Day       string `json:"day"`
	Year      string `json:"year"`
	Estimated bool   `json:"estimated"`
}

DateControl is a basic input.

func (*DateControl) Date added in v0.5.3

func (entity *DateControl) Date() time.Time

Date is composed from the structure properties

func (*DateControl) Marshal added in v0.5.3

func (entity *DateControl) Marshal() Payload

Marshal to payload structure

func (*DateControl) Unmarshal added in v0.5.3

func (entity *DateControl) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*DateControl) Valid added in v0.5.3

func (entity *DateControl) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type DateRange added in v0.5.3

type DateRange struct {
	PayloadFrom Payload `json:"from" sql:"-"`
	PayloadTo   Payload `json:"to" sql:"-"`
	Present     bool    `json:"present"`

	// Validator specific fields
	From *DateControl `json:"-"`
	To   *DateControl `json:"-"`

	// Persister specific fields
	ID        int `json:"-"`
	AccountID int `json:"-"`
	FromID    int `json:"-"`
	ToID      int `json:"-"`
}

DateRange is a basic input.

func (*DateRange) Marshal added in v0.5.3

func (entity *DateRange) Marshal() Payload

Marshal to payload structure

func (*DateRange) Unmarshal added in v0.5.3

func (entity *DateRange) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*DateRange) Valid added in v0.5.3

func (entity *DateRange) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Email added in v0.5.3

type Email struct {
	ID    int    `json:"-"`
	Value string `json:"value"`
}

Email is a basic input.

func (*Email) Marshal added in v0.5.3

func (entity *Email) Marshal() Payload

Marshal to payload structure

func (*Email) Unmarshal added in v0.5.3

func (entity *Email) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Email) Valid added in v0.5.3

func (entity *Email) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type EmploymentActivity added in v0.5.3

type EmploymentActivity struct {
	ID               int    `json:"-"`
	Value            string `json:"value"`
	OtherExplanation string `json:"otherExplanation,omitempty"`
}

EmploymentActivity is a basic input.

func (*EmploymentActivity) Marshal added in v0.5.3

func (entity *EmploymentActivity) Marshal() Payload

Marshal to payload structure

func (*EmploymentActivity) Unmarshal added in v0.5.3

func (entity *EmploymentActivity) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*EmploymentActivity) Valid added in v0.5.3

func (entity *EmploymentActivity) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Entity added in v0.5.3

type Entity interface {
	Marshaller
	Validator
}

Entity is a structure which can marshall and validate.

type ErrFieldInvalid added in v0.5.3

type ErrFieldInvalid struct {
	Message string
}

ErrFieldInvalid represents an error for a field with an invalid value.

func (ErrFieldInvalid) Error added in v0.5.3

func (e ErrFieldInvalid) Error() string

Error returns the string representation of a Field Invalid error.

func (ErrFieldInvalid) Result added in v0.5.3

func (e ErrFieldInvalid) Result(fieldname string) interface{}

Result creates a struct that is properly formatted for the client-side validation.

type ErrFieldRequired added in v0.5.3

type ErrFieldRequired struct {
	Message string
}

ErrFieldRequired represents an error for a field that requires data.

func (ErrFieldRequired) Error added in v0.5.3

func (e ErrFieldRequired) Error() string

Error is a basic representation of a Require Field error.

func (ErrFieldRequired) Result added in v0.5.3

func (e ErrFieldRequired) Result(fieldname string) interface{}

Result creates a struct that is properly formatted for the client-side validation.

type ErrInvalidLocation added in v0.5.3

type ErrInvalidLocation struct {
	Message     string
	Suggestions []GeocodeResult
}

ErrInvalidLocation represents an error for location information with additional options.

func (ErrInvalidLocation) Error added in v0.5.3

func (e ErrInvalidLocation) Error() string

Error returns the error message.

func (ErrInvalidLocation) Result added in v0.5.3

func (e ErrInvalidLocation) Result(fieldname string) interface{}

Result creates a struct that is properly formatted for the client-side validation.

type ErrorStack added in v0.5.3

type ErrorStack []ErrorStackResults

ErrorStack contains a list of ErrorStackResults that have been captured.

func NewErrorStack added in v0.5.3

func NewErrorStack(fieldname string, err error) ErrorStack

NewErrorStack creates a new stack of errors for a particular field.

func (*ErrorStack) Append added in v0.5.3

func (stack *ErrorStack) Append(fieldname string, err error)

Append adds an error to the list of errors. For those that implement the ValidationResult interface, the return value for Result(fieldname) will be used to populate the stack. This is to properly format error/validation information that is to be returned to the client-side.

func (ErrorStack) Error added in v0.5.3

func (stack ErrorStack) Error() string

Error is string representation of an ErrorStack and displays the total number of errors. This is to implement the error type.

func (ErrorStack) HasErrors added in v0.5.3

func (stack ErrorStack) HasErrors() bool

HasErrors checks if any errors exist

func (ErrorStack) Result added in v0.5.3

func (stack ErrorStack) Result(fieldname string) interface{}

Result creates a struct that is properly formatted for the client-validation.

type ErrorStackResults added in v0.5.3

type ErrorStackResults interface{}

ErrorStackResults is an interface to be used to represent a collection of interfaces. This currently has no additional methods

type FinancialBankruptcy added in v0.5.3

type FinancialBankruptcy struct {
	PayloadHasBankruptcy Payload `json:"HasBankruptcy" sql:"-"`
	PayloadList          Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasBankruptcy *Branch     `json:"-"`
	List          *Collection `json:"-"`

	// Persister specific fields
	ID              int `json:"-"`
	HasBankruptcyID int `json:"-" pg:", fk:HasBankruptcy"`
	ListID          int `json:"-" pg:", fk:List"`
}

FinancialBankruptcy represents the payload for the financial bankruptcy section.

func (*FinancialBankruptcy) ClearNoBranches

func (entity *FinancialBankruptcy) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*FinancialBankruptcy) Marshal added in v0.5.3

func (entity *FinancialBankruptcy) Marshal() Payload

Marshal to payload structure

func (*FinancialBankruptcy) Unmarshal added in v0.5.3

func (entity *FinancialBankruptcy) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*FinancialBankruptcy) Valid added in v0.5.3

func (entity *FinancialBankruptcy) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type FinancialCard added in v0.5.3

type FinancialCard struct {
	PayloadHasCardAbuse Payload `json:"HasCardAbuse" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasCardAbuse *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasCardAbuseID int `json:"-" pg:", fk:HasCardAbuse"`
	ListID         int `json:"-" pg:", fk:List"`
}

FinancialCard represents the payload for the financial card section.

func (*FinancialCard) ClearNoBranches

func (entity *FinancialCard) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*FinancialCard) Marshal added in v0.5.3

func (entity *FinancialCard) Marshal() Payload

Marshal to payload structure

func (*FinancialCard) Unmarshal added in v0.5.3

func (entity *FinancialCard) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*FinancialCard) Valid added in v0.5.3

func (entity *FinancialCard) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type FinancialCredit added in v0.5.3

type FinancialCredit struct {
	PayloadHasCreditCounseling Payload `json:"HasCreditCounseling" sql:"-"`
	PayloadList                Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasCreditCounseling *Branch     `json:"-"`
	List                *Collection `json:"-"`

	// Persister specific fields
	ID                    int `json:"-"`
	HasCreditCounselingID int `json:"-" pg:", fk:HasCreditCounseling"`
	ListID                int `json:"-" pg:", fk:List"`
}

FinancialCredit represents the payload for the financial credit section.

func (*FinancialCredit) ClearNoBranches

func (entity *FinancialCredit) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*FinancialCredit) Marshal added in v0.5.3

func (entity *FinancialCredit) Marshal() Payload

Marshal to payload structure

func (*FinancialCredit) Unmarshal added in v0.5.3

func (entity *FinancialCredit) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*FinancialCredit) Valid added in v0.5.3

func (entity *FinancialCredit) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type FinancialDelinquent added in v0.5.3

type FinancialDelinquent struct {
	PayloadHasDelinquent Payload `json:"HasDelinquent" sql:"-"`
	PayloadList          Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasDelinquent *Branch     `json:"-"`
	List          *Collection `json:"-"`

	// Persister specific fields
	ID              int `json:"-"`
	HasDelinquentID int `json:"-" pg:", fk:HasDelinquent"`
	ListID          int `json:"-" pg:", fk:List"`
}

FinancialDelinquent represents the payload for the financial delinquent section.

func (*FinancialDelinquent) ClearNoBranches

func (entity *FinancialDelinquent) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*FinancialDelinquent) Marshal added in v0.5.3

func (entity *FinancialDelinquent) Marshal() Payload

Marshal to payload structure

func (*FinancialDelinquent) Unmarshal added in v0.5.3

func (entity *FinancialDelinquent) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*FinancialDelinquent) Valid added in v0.5.3

func (entity *FinancialDelinquent) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type FinancialGambling added in v0.5.3

type FinancialGambling struct {
	PayloadHasGamblingDebt Payload `json:"HasGamblingDebt" sql:"-"`
	PayloadList            Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasGamblingDebt *Branch     `json:"-"`
	List            *Collection `json:"-"`

	// Persister specific fields
	ID                int `json:"-"`
	HasGamblingDebtID int `json:"-" pg:", fk:HasGamblingDebt"`
	ListID            int `json:"-" pg:", fk:List"`
}

FinancialGambling represents the payload for the financial gambling section.

func (*FinancialGambling) ClearNoBranches

func (entity *FinancialGambling) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*FinancialGambling) Marshal added in v0.5.3

func (entity *FinancialGambling) Marshal() Payload

Marshal to payload structure

func (*FinancialGambling) Unmarshal added in v0.5.3

func (entity *FinancialGambling) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*FinancialGambling) Valid added in v0.5.3

func (entity *FinancialGambling) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type FinancialNonpayment added in v0.5.3

type FinancialNonpayment struct {
	PayloadHasNonpayment Payload `json:"HasNonpayment" sql:"-"`
	PayloadList          Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasNonpayment *Branch     `json:"-"`
	List          *Collection `json:"-"`

	// Persister specific fields
	ID              int `json:"-"`
	HasNonpaymentID int `json:"-" pg:", fk:HasNonpayment"`
	ListID          int `json:"-" pg:", fk:List"`
}

FinancialNonpayment represents the payload for the financial nonpayment section.

func (*FinancialNonpayment) ClearNoBranches

func (entity *FinancialNonpayment) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*FinancialNonpayment) Marshal added in v0.5.3

func (entity *FinancialNonpayment) Marshal() Payload

Marshal to payload structure

func (*FinancialNonpayment) Unmarshal added in v0.5.3

func (entity *FinancialNonpayment) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*FinancialNonpayment) Valid added in v0.5.3

func (entity *FinancialNonpayment) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type FinancialTaxes added in v0.5.3

type FinancialTaxes struct {
	PayloadHasTaxes Payload `json:"HasTaxes" sql:"-"`
	PayloadList     Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasTaxes *Branch     `json:"-"`
	List     *Collection `json:"-"`

	// Persister specific fields
	ID         int `json:"-"`
	HasTaxesID int `json:"-" pg:", fk:HasTaxes"`
	ListID     int `json:"-" pg:", fk:List"`
}

FinancialTaxes represents the payload for the financial taxes section.

func (*FinancialTaxes) ClearNoBranches

func (entity *FinancialTaxes) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*FinancialTaxes) Marshal added in v0.5.3

func (entity *FinancialTaxes) Marshal() Payload

Marshal to payload structure

func (*FinancialTaxes) Unmarshal added in v0.5.3

func (entity *FinancialTaxes) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*FinancialTaxes) Valid added in v0.5.3

func (entity *FinancialTaxes) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignActivitiesBenefits added in v0.5.3

type ForeignActivitiesBenefits struct {
	PayloadHasBenefits Payload `json:"HasBenefits" sql:"-"`
	PayloadList        Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasBenefits *Branch     `json:"-"`
	List        *Collection `json:"-"`

	// Persister specific fields
	ID            int `json:"-"`
	HasBenefitsID int `json:"-" pg:", fk:HasBenefits"`
	ListID        int `json:"-" pg:", fk:List"`
}

ForeignActivitiesBenefits represents the payload for the foreign activities benefits section.

func (*ForeignActivitiesBenefits) ClearNoBranches

func (entity *ForeignActivitiesBenefits) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignActivitiesBenefits) Marshal added in v0.5.3

func (entity *ForeignActivitiesBenefits) Marshal() Payload

Marshal to payload structure

func (*ForeignActivitiesBenefits) Unmarshal added in v0.5.3

func (entity *ForeignActivitiesBenefits) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignActivitiesBenefits) Valid added in v0.5.3

func (entity *ForeignActivitiesBenefits) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignActivitiesDirect added in v0.5.3

type ForeignActivitiesDirect struct {
	PayloadHasInterests Payload `json:"HasInterests" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasInterests *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasInterestsID int `json:"-" pg:", fk:HasInterests"`
	ListID         int `json:"-" pg:", fk:List"`
}

ForeignActivitiesDirect represents the payload for the foreign activities direct section.

func (*ForeignActivitiesDirect) ClearNoBranches

func (entity *ForeignActivitiesDirect) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignActivitiesDirect) Marshal added in v0.5.3

func (entity *ForeignActivitiesDirect) Marshal() Payload

Marshal to payload structure

func (*ForeignActivitiesDirect) Unmarshal added in v0.5.3

func (entity *ForeignActivitiesDirect) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignActivitiesDirect) Valid added in v0.5.3

func (entity *ForeignActivitiesDirect) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignActivitiesIndirect added in v0.5.3

type ForeignActivitiesIndirect struct {
	PayloadHasInterests Payload `json:"HasInterests" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasInterests *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasInterestsID int `json:"-" pg:", fk:HasInterests"`
	ListID         int `json:"-" pg:", fk:List"`
}

ForeignActivitiesIndirect represents the payload for the foreign activities indirect section.

func (*ForeignActivitiesIndirect) ClearNoBranches

func (entity *ForeignActivitiesIndirect) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignActivitiesIndirect) Marshal added in v0.5.3

func (entity *ForeignActivitiesIndirect) Marshal() Payload

Marshal to payload structure

func (*ForeignActivitiesIndirect) Unmarshal added in v0.5.3

func (entity *ForeignActivitiesIndirect) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignActivitiesIndirect) Valid added in v0.5.3

func (entity *ForeignActivitiesIndirect) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignActivitiesRealEstate added in v0.5.3

type ForeignActivitiesRealEstate struct {
	PayloadHasInterests Payload `json:"HasInterests" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasInterests *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasInterestsID int `json:"-" pg:", fk:HasInterests"`
	ListID         int `json:"-" pg:", fk:List"`
}

ForeignActivitiesRealEstate represents the payload for the foreign activities real estate section.

func (*ForeignActivitiesRealEstate) ClearNoBranches

func (entity *ForeignActivitiesRealEstate) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignActivitiesRealEstate) Marshal added in v0.5.3

func (entity *ForeignActivitiesRealEstate) Marshal() Payload

Marshal to payload structure

func (*ForeignActivitiesRealEstate) Unmarshal added in v0.5.3

func (entity *ForeignActivitiesRealEstate) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignActivitiesRealEstate) Valid added in v0.5.3

func (entity *ForeignActivitiesRealEstate) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignActivitiesSupport added in v0.5.3

type ForeignActivitiesSupport struct {
	PayloadHasForeignSupport Payload `json:"HasForeignSupport" sql:"-"`
	PayloadList              Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignSupport *Branch     `json:"-"`
	List              *Collection `json:"-"`

	// Persister specific fields
	ID                  int `json:"-"`
	HasForeignSupportID int `json:"-" pg:", fk:HasForeignSupport"`
	ListID              int `json:"-" pg:", fk:List"`
}

ForeignActivitiesSupport represents the payload for the foreign activities support section.

func (*ForeignActivitiesSupport) ClearNoBranches

func (entity *ForeignActivitiesSupport) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignActivitiesSupport) Marshal added in v0.5.3

func (entity *ForeignActivitiesSupport) Marshal() Payload

Marshal to payload structure

func (*ForeignActivitiesSupport) Unmarshal added in v0.5.3

func (entity *ForeignActivitiesSupport) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignActivitiesSupport) Valid added in v0.5.3

func (entity *ForeignActivitiesSupport) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBornDocument added in v0.5.3

type ForeignBornDocument struct {
	PayloadDocumentType                    Payload `json:"DocumentType" sql:"-"`
	PayloadOtherExplanation                Payload `json:"OtherExplanation" sql:"-"`
	PayloadDocumentNumber                  Payload `json:"DocumentNumber" sql:"-"`
	PayloadDocumentExpiration              Payload `json:"DocumentExpiration" sql:"-"`
	PayloadDocumentExpirationNotApplicable Payload `json:"DocumentExpirationNotApplicable" sql:"-"`

	// Validator specific fields
	DocumentType                    *Radio         `json:"-"`
	OtherExplanation                *Textarea      `json:"-"`
	DocumentNumber                  *Text          `json:"-"`
	DocumentExpiration              *DateControl   `json:"-"`
	DocumentExpirationNotApplicable *NotApplicable `json:"-"`

	// Persister specific fields
	ID                                int `json:"-"`
	AccountID                         int `json:"-"`
	DocumentTypeID                    int `json:"-"`
	OtherExplanationID                int `json:"-"`
	DocumentNumberID                  int `json:"-"`
	DocumentExpirationID              int `json:"-"`
	DocumentExpirationNotApplicableID int `json:"-"`
}

ForeignBornDocument is a basic input.

func (*ForeignBornDocument) Marshal added in v0.5.3

func (entity *ForeignBornDocument) Marshal() Payload

Marshal to payload structure

func (*ForeignBornDocument) Unmarshal added in v0.5.3

func (entity *ForeignBornDocument) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBornDocument) Valid added in v0.5.3

func (entity *ForeignBornDocument) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessAdvice added in v0.5.3

type ForeignBusinessAdvice struct {
	PayloadHasForeignAdvice Payload `json:"HasForeignAdvice" sql:"-"`
	PayloadList             Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignAdvice *Branch     `json:"-"`
	List             *Collection `json:"-"`

	// Persister specific fields
	ID                 int `json:"-"`
	HasForeignAdviceID int `json:"-" pg:", fk:HasForeignAdvice"`
	ListID             int `json:"-" pg:", fk:List"`
}

ForeignBusinessAdvice represents the payload for the foreign business advice section.

func (*ForeignBusinessAdvice) ClearNoBranches

func (entity *ForeignBusinessAdvice) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessAdvice) Marshal added in v0.5.3

func (entity *ForeignBusinessAdvice) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessAdvice) Unmarshal added in v0.5.3

func (entity *ForeignBusinessAdvice) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessAdvice) Valid added in v0.5.3

func (entity *ForeignBusinessAdvice) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessConferences added in v0.5.3

type ForeignBusinessConferences struct {
	PayloadHasForeignConferences Payload `json:"HasForeignConferences" sql:"-"`
	PayloadList                  Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignConferences *Branch     `json:"-"`
	List                  *Collection `json:"-"`

	// Persister specific fields
	ID                      int `json:"-"`
	HasForeignConferencesID int `json:"-" pg:", fk:HasForeignConferences"`
	ListID                  int `json:"-" pg:", fk:List"`
}

ForeignBusinessConferences represents the payload for the foreign business conferences section.

func (*ForeignBusinessConferences) ClearNoBranches

func (entity *ForeignBusinessConferences) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessConferences) Marshal added in v0.5.3

func (entity *ForeignBusinessConferences) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessConferences) Unmarshal added in v0.5.3

func (entity *ForeignBusinessConferences) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessConferences) Valid added in v0.5.3

func (entity *ForeignBusinessConferences) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessContact added in v0.5.3

type ForeignBusinessContact struct {
	PayloadHasForeignContact Payload `json:"HasForeignContact" sql:"-"`
	PayloadList              Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignContact *Branch     `json:"-"`
	List              *Collection `json:"-"`

	// Persister specific fields
	ID                  int `json:"-"`
	HasForeignContactID int `json:"-" pg:", fk:HasForeignContact"`
	ListID              int `json:"-" pg:", fk:List"`
}

ForeignBusinessContact represents the payload for the foreign business contact section.

func (*ForeignBusinessContact) ClearNoBranches

func (entity *ForeignBusinessContact) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessContact) Marshal added in v0.5.3

func (entity *ForeignBusinessContact) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessContact) Unmarshal added in v0.5.3

func (entity *ForeignBusinessContact) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessContact) Valid added in v0.5.3

func (entity *ForeignBusinessContact) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessEmployment added in v0.5.3

type ForeignBusinessEmployment struct {
	PayloadHasForeignEmployment Payload `json:"HasForeignEmployment" sql:"-"`
	PayloadList                 Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignEmployment *Branch     `json:"-"`
	List                 *Collection `json:"-"`

	// Persister specific fields
	ID                     int `json:"-"`
	HasForeignEmploymentID int `json:"-" pg:", fk:HasForeignEmployment"`
	ListID                 int `json:"-" pg:", fk:List"`
}

ForeignBusinessEmployment represents the payload for the foreign business employment section.

func (*ForeignBusinessEmployment) ClearNoBranches

func (entity *ForeignBusinessEmployment) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessEmployment) Marshal added in v0.5.3

func (entity *ForeignBusinessEmployment) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessEmployment) Unmarshal added in v0.5.3

func (entity *ForeignBusinessEmployment) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessEmployment) Valid added in v0.5.3

func (entity *ForeignBusinessEmployment) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessFamily added in v0.5.3

type ForeignBusinessFamily struct {
	PayloadHasForeignFamily Payload `json:"HasForeignFamily" sql:"-"`
	PayloadList             Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignFamily *Branch     `json:"-"`
	List             *Collection `json:"-"`

	// Persister specific fields
	ID                 int `json:"-"`
	HasForeignFamilyID int `json:"-" pg:", fk:HasForeignFamily"`
	ListID             int `json:"-" pg:", fk:List"`
}

ForeignBusinessFamily represents the payload for the foreign business family section.

func (*ForeignBusinessFamily) ClearNoBranches

func (entity *ForeignBusinessFamily) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessFamily) Marshal added in v0.5.3

func (entity *ForeignBusinessFamily) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessFamily) Unmarshal added in v0.5.3

func (entity *ForeignBusinessFamily) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessFamily) Valid added in v0.5.3

func (entity *ForeignBusinessFamily) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessPolitical added in v0.5.3

type ForeignBusinessPolitical struct {
	PayloadHasForeignPolitical Payload `json:"HasForeignPolitical" sql:"-"`
	PayloadList                Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignPolitical *Branch     `json:"-"`
	List                *Collection `json:"-"`

	// Persister specific fields
	ID                    int `json:"-"`
	HasForeignPoliticalID int `json:"-" pg:", fk:HasForeignPolitical"`
	ListID                int `json:"-" pg:", fk:List"`
}

ForeignBusinessPolitical represents the payload for the foreign business political section.

func (*ForeignBusinessPolitical) ClearNoBranches

func (entity *ForeignBusinessPolitical) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessPolitical) Marshal added in v0.5.3

func (entity *ForeignBusinessPolitical) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessPolitical) Unmarshal added in v0.5.3

func (entity *ForeignBusinessPolitical) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessPolitical) Valid added in v0.5.3

func (entity *ForeignBusinessPolitical) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessSponsorship added in v0.5.3

type ForeignBusinessSponsorship struct {
	PayloadHasForeignSponsorship Payload `json:"HasForeignSponsorship" sql:"-"`
	PayloadList                  Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignSponsorship *Branch     `json:"-"`
	List                  *Collection `json:"-"`

	// Persister specific fields
	ID                      int `json:"-"`
	HasForeignSponsorshipID int `json:"-" pg:", fk:HasForeignSponsorship"`
	ListID                  int `json:"-" pg:", fk:List"`
}

ForeignBusinessSponsorship represents the payload for the foreign business sponsorship section.

func (*ForeignBusinessSponsorship) ClearNoBranches

func (entity *ForeignBusinessSponsorship) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessSponsorship) Marshal added in v0.5.3

func (entity *ForeignBusinessSponsorship) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessSponsorship) Unmarshal added in v0.5.3

func (entity *ForeignBusinessSponsorship) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessSponsorship) Valid added in v0.5.3

func (entity *ForeignBusinessSponsorship) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessVentures added in v0.5.3

type ForeignBusinessVentures struct {
	PayloadHasForeignVentures Payload `json:"HasForeignVentures" sql:"-"`
	PayloadList               Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignVentures *Branch     `json:"-"`
	List               *Collection `json:"-"`

	// Persister specific fields
	ID                   int `json:"-"`
	HasForeignVenturesID int `json:"-" pg:", fk:HasForeignVentures"`
	ListID               int `json:"-" pg:", fk:List"`
}

ForeignBusinessVentures represents the payload for the foreign business ventures section.

func (*ForeignBusinessVentures) ClearNoBranches

func (entity *ForeignBusinessVentures) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessVentures) Marshal added in v0.5.3

func (entity *ForeignBusinessVentures) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessVentures) Unmarshal added in v0.5.3

func (entity *ForeignBusinessVentures) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessVentures) Valid added in v0.5.3

func (entity *ForeignBusinessVentures) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignBusinessVoting added in v0.5.3

type ForeignBusinessVoting struct {
	PayloadHasForeignVoting Payload `json:"HasForeignVoting" sql:"-"`
	PayloadList             Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignVoting *Branch     `json:"-"`
	List             *Collection `json:"-"`

	// Persister specific fields
	ID                 int `json:"-"`
	HasForeignVotingID int `json:"-" pg:", fk:HasForeignVoting"`
	ListID             int `json:"-" pg:", fk:List"`
}

ForeignBusinessVoting represents the payload for the foreign business voting section.

func (*ForeignBusinessVoting) ClearNoBranches

func (entity *ForeignBusinessVoting) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignBusinessVoting) Marshal added in v0.5.3

func (entity *ForeignBusinessVoting) Marshal() Payload

Marshal to payload structure

func (*ForeignBusinessVoting) Unmarshal added in v0.5.3

func (entity *ForeignBusinessVoting) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignBusinessVoting) Valid added in v0.5.3

func (entity *ForeignBusinessVoting) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignContacts added in v0.5.3

type ForeignContacts struct {
	PayloadHasForeignContacts Payload `json:"HasForeignContacts" sql:"-"`
	PayloadList               Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignContacts *Branch     `json:"-"`
	List               *Collection `json:"-"`

	// Persister specific fields
	ID                   int `json:"-"`
	HasForeignContactsID int `json:"-" pg:", fk:HasForeignContacts"`
	ListID               int `json:"-" pg:", fk:List"`
}

ForeignContacts represents the payload for the foreign contacts section.

func (*ForeignContacts) ClearNoBranches

func (entity *ForeignContacts) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignContacts) Marshal added in v0.5.3

func (entity *ForeignContacts) Marshal() Payload

Marshal to payload structure

func (*ForeignContacts) Unmarshal added in v0.5.3

func (entity *ForeignContacts) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignContacts) Valid added in v0.5.3

func (entity *ForeignContacts) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignPassport added in v0.5.3

type ForeignPassport struct {
	PayloadHasPassports Payload `json:"HasPassports" sql:"-"`
	PayloadName         Payload `json:"Name" sql:"-"`
	PayloadCard         Payload `json:"Card" sql:"-"`
	PayloadNumber       Payload `json:"Number" sql:"-"`
	PayloadIssued       Payload `json:"Issued" sql:"-"`
	PayloadExpiration   Payload `json:"Expiration" sql:"-"`
	PayloadComments     Payload `json:"Comments" sql:"-"`

	// Validator specific fields
	HasPassports *Branch      `json:"-"`
	Name         *Name        `json:"-"`
	Card         *Radio       `json:"-"`
	Number       *Text        `json:"-"`
	Issued       *DateControl `json:"-"`
	Expiration   *DateControl `json:"-"`
	Comments     *Textarea    `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasPassportsID int `json:"-" pg:",fk:HasPassports"`
	NameID         int `json:"-" pg:",fk:Name"`
	CardID         int `json:"-" pg:",fk:Card"`
	NumberID       int `json:"-" pg:",fk:Number"`
	IssuedID       int `json:"-" pg:",fk:Issued"`
	ExpirationID   int `json:"-" pg:",fk:Expiration"`
	CommentsID     int `json:"-" pg:",fk:Comments"`
}

ForeignPassport represents the payload for the foreign passport section.

func (*ForeignPassport) ClearNoBranches

func (entity *ForeignPassport) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignPassport) Marshal added in v0.5.3

func (entity *ForeignPassport) Marshal() Payload

Marshal to payload structure

func (*ForeignPassport) Unmarshal added in v0.5.3

func (entity *ForeignPassport) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignPassport) Valid added in v0.5.3

func (entity *ForeignPassport) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ForeignTravel added in v0.5.3

type ForeignTravel struct {
	PayloadHasForeignTravelOutside  Payload `json:"HasForeignTravelOutside" sql:"-"`
	PayloadHasForeignTravelOfficial Payload `json:"HasForeignTravelOfficial" sql:"-"`
	PayloadList                     Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasForeignTravelOutside  *Branch     `json:"-"`
	HasForeignTravelOfficial *Branch     `json:"-"`
	List                     *Collection `json:"-"`

	// Persister specific fields
	ID                         int `json:"-"`
	HasForeignTravelOutsideID  int `json:"-" pg:", fk:HasForeignTravelOutside"`
	HasForeignTravelOfficialID int `json:"-" pg:", fk:HasForeignTravelOfficial"`
	ListID                     int `json:"-" pg:", fk:List"`
}

ForeignTravel represents the payload for the foreign travel section.

func (*ForeignTravel) ClearNoBranches

func (entity *ForeignTravel) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*ForeignTravel) Marshal added in v0.5.3

func (entity *ForeignTravel) Marshal() Payload

Marshal to payload structure

func (*ForeignTravel) Unmarshal added in v0.5.3

func (entity *ForeignTravel) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ForeignTravel) Valid added in v0.5.3

func (entity *ForeignTravel) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type GeocodeResult added in v0.5.3

type GeocodeResult struct {
	Street    string
	Street2   string
	City      string
	State     string
	County    string
	Country   string
	Zipcode   string
	Formatted string
	Partial   bool
	Error     string
}

GeocodeResult represents geocoded information that has been transformed from the original source. All Geocoders should convert their location information into a GeocodeResult struct.

func (GeocodeResult) String added in v0.5.3

func (r GeocodeResult) String() string

String returns a friendly representation of a GeocodeResult.

type GeocodeResults added in v0.5.3

type GeocodeResults []GeocodeResult

GeocodeResults contains a list of found Result. It contains helper methods to determine if partial matches were found.

func (GeocodeResults) Empty added in v0.5.3

func (r GeocodeResults) Empty() bool

Empty determines if any results are available.

func (GeocodeResults) HasErrors added in v0.5.3

func (r GeocodeResults) HasErrors() bool

HasErrors checks if any of the results contains error information.

func (GeocodeResults) HasPartial added in v0.5.3

func (r GeocodeResults) HasPartial() bool

HasPartial determines if any of the matches is partial.

type GeocodeValues added in v0.5.3

type GeocodeValues struct {
	Street  string
	Street2 string
	City    string
	State   string
	Zipcode string
	County  string
	Country string
}

GeocodeValues stores generic geospatial related query parameters.

type Geocoder added in v0.5.3

type Geocoder interface {
	Validate(GeocodeValues) (GeocodeResults, error)
}

Geocoder is an interface for geocoding implementations.

var (
	// Geocode is the geocoder to be used by the application. It points to an interface so that the
	// underlying implementation can be easily swapped out.
	Geocode Geocoder

	// ErrNoResultsFound is a generic error when results are not found but a request was valid.
	ErrNoResultsFound = errors.New("No geolocation results were found")
)

type Height added in v0.5.3

type Height struct {
	ID     int `json:"-"`
	Feet   int `json:"feet"`
	Inches int `json:"inches"`
}

Height is a basic input.

func (*Height) Marshal added in v0.5.3

func (entity *Height) Marshal() Payload

Marshal to payload structure

func (*Height) Unmarshal added in v0.5.3

func (entity *Height) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Height) Valid added in v0.5.3

func (entity *Height) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type HistoryEducation added in v0.5.3

type HistoryEducation struct {
	PayloadHasAttended Payload `json:"HasAttended" sql:"-"`
	PayloadHasDegree10 Payload `json:"HasDegree10" sql:"-"`
	PayloadList        Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasAttended *Branch     `json:"-" sql:"-"`
	HasDegree10 *Branch     `json:"-" sql:"-"`
	List        *Collection `json:"-" sql:"-"`

	// Persister specific fields
	ID            int `json:"-"`
	HasAttendedID int `json:"-" pg:", fk:HasAttended"`
	HasDegree10ID int `json:"-" pg:", fk:HasDegree10" sql:"has_degree10_id"`
	ListID        int `json:"-" pg:", fk:List"`
}

HistoryEducation represents the payload for the history education section.

func (*HistoryEducation) ClearNoBranches

func (entity *HistoryEducation) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*HistoryEducation) Marshal added in v0.5.3

func (entity *HistoryEducation) Marshal() Payload

Marshal to payload structure

func (*HistoryEducation) Unmarshal added in v0.5.3

func (entity *HistoryEducation) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*HistoryEducation) Valid added in v0.5.3

func (entity *HistoryEducation) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type HistoryEmployment added in v0.5.3

type HistoryEmployment struct {
	PayloadList             Payload `json:"List" sql:"-"`
	PayloadEmploymentRecord Payload `json:"EmploymentRecord" sql:"-"`

	// Validator specific fields
	List             *Collection `json:"-"`
	EmploymentRecord *Branch     `json:"-"`

	// Persister specific fields
	ID                 int `json:"-"`
	ListID             int `json:"-" pg:", fk:List"`
	EmploymentRecordID int `json:"-"`
}

HistoryEmployment represents the payload for the history employment section.

func (*HistoryEmployment) ClearNoBranches

func (entity *HistoryEmployment) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*HistoryEmployment) Marshal added in v0.5.3

func (entity *HistoryEmployment) Marshal() Payload

Marshal to payload structure

func (*HistoryEmployment) Unmarshal added in v0.5.3

func (entity *HistoryEmployment) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*HistoryEmployment) Valid added in v0.5.3

func (entity *HistoryEmployment) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type HistoryFederal added in v0.5.3

type HistoryFederal struct {
	PayloadHasFederalService Payload `json:"HasFederalService" sql:"-"`
	PayloadList              Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasFederalService *Branch     `json:"-"`
	List              *Collection `json:"-"`

	// Persister specific fields
	ID                  int `json:"-"`
	HasFederalServiceID int `json:"-" pg:", fk:HasFederalService"`
	ListID              int `json:"-" pg:", fk:List"`
}

HistoryFederal represents the payload for the history federal section.

func (*HistoryFederal) ClearNoBranches

func (entity *HistoryFederal) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*HistoryFederal) Marshal added in v0.5.3

func (entity *HistoryFederal) Marshal() Payload

Marshal to payload structure

func (*HistoryFederal) Unmarshal added in v0.5.3

func (entity *HistoryFederal) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*HistoryFederal) Valid added in v0.5.3

func (entity *HistoryFederal) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type HistoryResidence added in v0.5.3

type HistoryResidence struct {
	PayloadList Payload `json:"List" sql:"-"`

	// Validator specific fields
	List *Collection `json:"-"`

	// Persister specific fields
	ID     int `json:"-"`
	ListID int `json:"-" pg:", fk:List"`
}

HistoryResidence represents the payload for the history residence section.

func (*HistoryResidence) ClearNoBranches

func (entity *HistoryResidence) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*HistoryResidence) Marshal added in v0.5.3

func (entity *HistoryResidence) Marshal() Payload

Marshal to payload structure

func (*HistoryResidence) Unmarshal added in v0.5.3

func (entity *HistoryResidence) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*HistoryResidence) Valid added in v0.5.3

func (entity *HistoryResidence) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type IdentificationBirthDate added in v0.5.3

type IdentificationBirthDate struct {
	PayloadDate      Payload `json:"Date" sql:"-"`
	PayloadConfirmed Payload `json:"Confirmed" sql:"-"`

	// Validator specific fields
	Date      *DateControl `json:"-"`
	Confirmed *Checkbox    `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	DateID      int `json:"-" pg:", fk:Date"`
	ConfirmedID int `json:"-"`
}

IdentificationBirthDate represents the payload for the identification birth date section.

func (*IdentificationBirthDate) Marshal added in v0.5.3

func (entity *IdentificationBirthDate) Marshal() Payload

Marshal to payload structure

func (*IdentificationBirthDate) Unmarshal added in v0.5.3

func (entity *IdentificationBirthDate) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*IdentificationBirthDate) Valid added in v0.5.3

func (entity *IdentificationBirthDate) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type IdentificationBirthPlace added in v0.5.3

type IdentificationBirthPlace struct {
	Payload Payload `json:"Location" sql:"-"`

	// Validator specific fields
	Location *Location `json:"-"`

	// Persister specific fields
	ID         int `json:"-"`
	LocationID int `json:"-" pg:", fk:Location"`
}

IdentificationBirthPlace represents the payload for the identification birth place section.

func (*IdentificationBirthPlace) Marshal added in v0.5.3

func (entity *IdentificationBirthPlace) Marshal() Payload

Marshal to payload structure

func (*IdentificationBirthPlace) Unmarshal added in v0.5.3

func (entity *IdentificationBirthPlace) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*IdentificationBirthPlace) Valid added in v0.5.3

func (entity *IdentificationBirthPlace) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type IdentificationContacts added in v0.5.3

type IdentificationContacts struct {
	PayloadHomeEmail    Payload `json:"HomeEmail" sql:"-"`
	PayloadWorkEmail    Payload `json:"WorkEmail" sql:"-"`
	PayloadPhoneNumbers Payload `json:"PhoneNumbers" sql:"-"`

	// Validator specific fields
	HomeEmail    *Email      `json:"-"`
	WorkEmail    *Email      `json:"-"`
	PhoneNumbers *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HomeEmailID    int `json:"-" pg:", fk:HomeEmail"`
	WorkEmailID    int `json:"-" pg:", fk:WorkEmail"`
	PhoneNumbersID int `json:"-" pg:", fk:PhoneNumbers"`
}

IdentificationContacts represents the payload for the identification contact information section.

func (*IdentificationContacts) Marshal added in v0.5.3

func (entity *IdentificationContacts) Marshal() Payload

Marshal to payload structure

func (*IdentificationContacts) Unmarshal added in v0.5.3

func (entity *IdentificationContacts) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*IdentificationContacts) Valid added in v0.5.3

func (entity *IdentificationContacts) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type IdentificationName added in v0.5.3

type IdentificationName struct {
	PayloadName Payload `json:"Name" sql:"-"`

	// Validator specific fields
	Name *Name `json:"-"`

	// Persister specific fields
	ID     int `json:"-"`
	NameID int `json:"-" pg:", fk:Name"`
}

IdentificationName represents the payload for the identification name section.

func (*IdentificationName) Marshal added in v0.5.3

func (entity *IdentificationName) Marshal() Payload

Marshal to payload structure

func (*IdentificationName) Unmarshal added in v0.5.3

func (entity *IdentificationName) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*IdentificationName) Valid added in v0.5.3

func (entity *IdentificationName) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type IdentificationOtherNames added in v0.5.3

type IdentificationOtherNames struct {
	PayloadHasOtherNames Payload `json:"HasOtherNames" sql:"-"`
	PayloadList          Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasOtherNames *Branch     `json:"-"`
	List          *Collection `json:"-"`

	// Persister specific fields
	ID              int `json:"-"`
	HasOtherNamesID int `json:"-" pg:", fk:HasOtherNames"`
	ListID          int `json:"-" pg:", fk:List"`
}

IdentificationOtherNames represents the payload for the identification other names section.

func (*IdentificationOtherNames) ClearNoBranches

func (entity *IdentificationOtherNames) ClearNoBranches() error

ClearNoBranches Implements the Rejector interface and clears any nos on applicaiton kickback

func (*IdentificationOtherNames) Marshal added in v0.5.3

func (entity *IdentificationOtherNames) Marshal() Payload

Marshal to payload structure

func (*IdentificationOtherNames) Unmarshal added in v0.5.3

func (entity *IdentificationOtherNames) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*IdentificationOtherNames) Valid added in v0.5.3

func (entity *IdentificationOtherNames) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type IdentificationPhysical added in v0.5.3

type IdentificationPhysical struct {
	PayloadComments  Payload `json:"Comments" sql:"-"`
	PayloadEyeColor  Payload `json:"EyeColor" sql:"-"`
	PayloadHairColor Payload `json:"HairColor" sql:"-"`
	PayloadHeight    Payload `json:"Height" sql:"-"`
	PayloadSex       Payload `json:"Sex" sql:"-"`
	PayloadWeight    Payload `json:"Weight" sql:"-"`

	// Validator specific fields
	Comments  *Textarea `json:"-"`
	EyeColor  *Text     `json:"-"`
	HairColor *Text     `json:"-"`
	Sex       *Text     `json:"-"`
	Height    *Height   `json:"-"`
	Weight    *Number   `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	CommentsID  int `json:"-" pg:", fk:Comments"`
	EyeColorID  int `json:"-" pg:", fk:EyeColor"`
	HairColorID int `json:"-" pg:", fk:HairColor"`
	SexID       int `json:"-" pg:", fk:Sex"`
	HeightID    int `json:"-" pg:", fk:Height"`
	WeightID    int `json:"-" pg:", fk:Weight"`
}

IdentificationPhysical represents the payload for the identification physical traits section.

func (*IdentificationPhysical) Marshal added in v0.5.3

func (entity *IdentificationPhysical) Marshal() Payload

Marshal to payload structure

func (*IdentificationPhysical) Unmarshal added in v0.5.3

func (entity *IdentificationPhysical) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*IdentificationPhysical) Valid added in v0.5.3

func (entity *IdentificationPhysical) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type IdentificationSSN added in v0.5.3

type IdentificationSSN struct {
	Payload Payload `json:"ssn" sql:"-"`

	// Validator specific fields
	Verified bool `json:"verified"`
	SSN      *SSN `json:"-" sql:"-"`

	// Persister specific fields
	ID    int `json:"-"`
	SSNID int `json:"-" pg:", fk:SSN"`
}

IdentificationSSN represents the payload for the identification SSN section.

func (*IdentificationSSN) Marshal added in v0.5.3

func (entity *IdentificationSSN) Marshal() Payload

Marshal to payload structure

func (*IdentificationSSN) Unmarshal added in v0.5.3

func (entity *IdentificationSSN) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*IdentificationSSN) Valid added in v0.5.3

func (entity *IdentificationSSN) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalAssociationsActivitiesToOverthrow added in v0.5.3

type LegalAssociationsActivitiesToOverthrow struct {
	PayloadHasActivities Payload `json:"HasActivities" sql:"-"`
	PayloadList          Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasActivities *Branch     `json:"-"`
	List          *Collection `json:"-"`

	// Persister specific fields
	ID              int `json:"-"`
	HasActivitiesID int `json:"-" pg:", fk:HasActivities"`
	ListID          int `json:"-" pg:", fk:List"`
}

LegalAssociationsActivitiesToOverthrow represents the payload for the legal associations activities to overthrow section.

func (*LegalAssociationsActivitiesToOverthrow) ClearNoBranches

func (entity *LegalAssociationsActivitiesToOverthrow) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalAssociationsActivitiesToOverthrow) Marshal added in v0.5.3

Marshal to payload structure

func (*LegalAssociationsActivitiesToOverthrow) Unmarshal added in v0.5.3

func (entity *LegalAssociationsActivitiesToOverthrow) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalAssociationsActivitiesToOverthrow) Valid added in v0.5.3

Valid checks the value(s) against an battery of tests.

type LegalAssociationsAdvocating added in v0.5.3

type LegalAssociationsAdvocating struct {
	PayloadHasAdvocated Payload `json:"HasAdvocated" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasAdvocated *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasAdvocatedID int `json:"-" pg:", fk:HasAdvocated"`
	ListID         int `json:"-" pg:", fk:List"`
}

LegalAssociationsAdvocating represents the payload for the legal associations advocating section.

func (*LegalAssociationsAdvocating) ClearNoBranches

func (entity *LegalAssociationsAdvocating) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalAssociationsAdvocating) Marshal added in v0.5.3

func (entity *LegalAssociationsAdvocating) Marshal() Payload

Marshal to payload structure

func (*LegalAssociationsAdvocating) Unmarshal added in v0.5.3

func (entity *LegalAssociationsAdvocating) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalAssociationsAdvocating) Valid added in v0.5.3

func (entity *LegalAssociationsAdvocating) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalAssociationsEngagedInTerrorism added in v0.5.3

type LegalAssociationsEngagedInTerrorism struct {
	PayloadHasEngaged Payload `json:"HasEngaged" sql:"-"`
	PayloadList       Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasEngaged *Branch     `json:"-"`
	List       *Collection `json:"-"`

	// Persister specific fields
	ID           int `json:"-"`
	HasEngagedID int `json:"-" pg:", fk:HasEngaged"`
	ListID       int `json:"-" pg:", fk:List"`
}

LegalAssociationsEngagedInTerrorism represents the payload for the legal associations engaged in terrorism section.

func (*LegalAssociationsEngagedInTerrorism) ClearNoBranches

func (entity *LegalAssociationsEngagedInTerrorism) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalAssociationsEngagedInTerrorism) Marshal added in v0.5.3

func (entity *LegalAssociationsEngagedInTerrorism) Marshal() Payload

Marshal to payload structure

func (*LegalAssociationsEngagedInTerrorism) Unmarshal added in v0.5.3

func (entity *LegalAssociationsEngagedInTerrorism) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalAssociationsEngagedInTerrorism) Valid added in v0.5.3

func (entity *LegalAssociationsEngagedInTerrorism) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalAssociationsMembershipOverthrow added in v0.5.3

type LegalAssociationsMembershipOverthrow struct {
	PayloadHasOverthrow Payload `json:"HasOverthrow" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasOverthrow *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasOverthrowID int `json:"-" pg:", fk:HasOverthrow"`
	ListID         int `json:"-" pg:", fk:List"`
}

LegalAssociationsMembershipOverthrow represents the payload for the legal associations membership to overthrow government section.

func (*LegalAssociationsMembershipOverthrow) ClearNoBranches

func (entity *LegalAssociationsMembershipOverthrow) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalAssociationsMembershipOverthrow) Marshal added in v0.5.3

Marshal to payload structure

func (*LegalAssociationsMembershipOverthrow) Unmarshal added in v0.5.3

func (entity *LegalAssociationsMembershipOverthrow) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalAssociationsMembershipOverthrow) Valid added in v0.5.3

func (entity *LegalAssociationsMembershipOverthrow) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalAssociationsMembershipViolence added in v0.5.3

type LegalAssociationsMembershipViolence struct {
	PayloadHasViolence Payload `json:"HasViolence" sql:"-"`
	PayloadList        Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasViolence *Branch     `json:"-"`
	List        *Collection `json:"-"`

	// Persister specific fields
	ID            int `json:"-"`
	HasViolenceID int `json:"-" pg:", fk:HasViolence"`
	ListID        int `json:"-" pg:", fk:List"`
}

LegalAssociationsMembershipViolence represents the payload for the legal associations memberhisp advocating violence section.

func (*LegalAssociationsMembershipViolence) ClearNoBranches

func (entity *LegalAssociationsMembershipViolence) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalAssociationsMembershipViolence) Marshal added in v0.5.3

func (entity *LegalAssociationsMembershipViolence) Marshal() Payload

Marshal to payload structure

func (*LegalAssociationsMembershipViolence) Unmarshal added in v0.5.3

func (entity *LegalAssociationsMembershipViolence) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalAssociationsMembershipViolence) Valid added in v0.5.3

func (entity *LegalAssociationsMembershipViolence) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalAssociationsTerrorismAssociation added in v0.5.3

type LegalAssociationsTerrorismAssociation struct {
	PayloadHasTerrorism Payload `json:"HasTerrorism" sql:"-"`
	PayloadExplanation  Payload `json:"Explanation" sql:"-"`

	// Validator specific fields
	HasTerrorism *Branch   `json:"-"`
	Explanation  *Textarea `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasTerrorismID int `json:"-" pg:", fk:HasTerrorism"`
	ExplanationID  int `json:"-" pg:", fk:Explanation"`
}

LegalAssociationsTerrorismAssociation represents the payload for the legal associations with terrorism section.

func (*LegalAssociationsTerrorismAssociation) ClearNoBranches

func (entity *LegalAssociationsTerrorismAssociation) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalAssociationsTerrorismAssociation) Marshal added in v0.5.3

Marshal to payload structure

func (*LegalAssociationsTerrorismAssociation) Unmarshal added in v0.5.3

func (entity *LegalAssociationsTerrorismAssociation) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalAssociationsTerrorismAssociation) Valid added in v0.5.3

Valid checks the value(s) against an battery of tests.

type LegalAssociationsTerroristOrganization added in v0.5.3

type LegalAssociationsTerroristOrganization struct {
	PayloadHasTerrorist Payload `json:"HasTerrorist" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasTerrorist *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasTerroristID int `json:"-" pg:", fk:HasTerrorist"`
	ListID         int `json:"-" pg:", fk:List"`
}

LegalAssociationsTerroristOrganization represents the payload for the legal associations with terrorist organizations section.

func (*LegalAssociationsTerroristOrganization) ClearNoBranches

func (entity *LegalAssociationsTerroristOrganization) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalAssociationsTerroristOrganization) Marshal added in v0.5.3

Marshal to payload structure

func (*LegalAssociationsTerroristOrganization) Unmarshal added in v0.5.3

func (entity *LegalAssociationsTerroristOrganization) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalAssociationsTerroristOrganization) Valid added in v0.5.3

Valid checks the value(s) against an battery of tests.

type LegalCourt added in v0.5.3

type LegalCourt struct {
	PayloadHasCourtActions Payload `json:"HasCourtActions" sql:"-"`
	PayloadList            Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasCourtActions *Branch     `json:"-"`
	List            *Collection `json:"-"`

	// Persister specific fields
	ID                int `json:"-"`
	HasCourtActionsID int `json:"-" pg:", fk:HasCourtActions"`
	ListID            int `json:"-" pg:", fk:List"`
}

LegalCourt represents the payload for the legal noncriminal court section.

func (*LegalCourt) ClearNoBranches

func (entity *LegalCourt) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalCourt) Marshal added in v0.5.3

func (entity *LegalCourt) Marshal() Payload

Marshal to payload structure

func (*LegalCourt) Unmarshal added in v0.5.3

func (entity *LegalCourt) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalCourt) Valid added in v0.5.3

func (entity *LegalCourt) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalInvestigationsDebarred added in v0.5.3

type LegalInvestigationsDebarred struct {
	PayloadHasDebarment Payload `json:"HasDebarment" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasDebarment *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HasDebarmentID int `json:"-" pg:", fk:HasDebarment"`
	ListID         int `json:"-" pg:", fk:List"`
}

LegalInvestigationsDebarred represents the payload for the legal investigations debarred section.

func (*LegalInvestigationsDebarred) ClearNoBranches

func (entity *LegalInvestigationsDebarred) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalInvestigationsDebarred) Marshal added in v0.5.3

func (entity *LegalInvestigationsDebarred) Marshal() Payload

Marshal to payload structure

func (*LegalInvestigationsDebarred) Unmarshal added in v0.5.3

func (entity *LegalInvestigationsDebarred) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalInvestigationsDebarred) Valid added in v0.5.3

func (entity *LegalInvestigationsDebarred) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalInvestigationsHistory added in v0.5.3

type LegalInvestigationsHistory struct {
	PayloadHasHistory Payload `json:"HasHistory" sql:"-"`
	PayloadList       Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasHistory *Branch     `json:"-"`
	List       *Collection `json:"-"`

	// Persister specific fields
	ID           int `json:"-"`
	HasHistoryID int `json:"-" pg:", fk:HasHistory"`
	ListID       int `json:"-" pg:", fk:List"`
}

LegalInvestigationsHistory represents the payload for the legal investigations history section.

func (*LegalInvestigationsHistory) ClearNoBranches

func (entity *LegalInvestigationsHistory) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalInvestigationsHistory) Marshal added in v0.5.3

func (entity *LegalInvestigationsHistory) Marshal() Payload

Marshal to payload structure

func (*LegalInvestigationsHistory) Unmarshal added in v0.5.3

func (entity *LegalInvestigationsHistory) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalInvestigationsHistory) Valid added in v0.5.3

func (entity *LegalInvestigationsHistory) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalInvestigationsRevoked added in v0.5.3

type LegalInvestigationsRevoked struct {
	PayloadHasRevocations Payload `json:"HasRevocations" sql:"-"`
	PayloadList           Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasRevocations *Branch     `json:"-"`
	List           *Collection `json:"-"`

	// Persister specific fields
	ID               int `json:"-"`
	HasRevocationsID int `json:"-" pg:", fk:HasRevocations"`
	ListID           int `json:"-" pg:", fk:List"`
}

LegalInvestigationsRevoked represents the payload for the legal investigatinos revoked section.

func (*LegalInvestigationsRevoked) ClearNoBranches

func (entity *LegalInvestigationsRevoked) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalInvestigationsRevoked) Marshal added in v0.5.3

func (entity *LegalInvestigationsRevoked) Marshal() Payload

Marshal to payload structure

func (*LegalInvestigationsRevoked) Unmarshal added in v0.5.3

func (entity *LegalInvestigationsRevoked) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalInvestigationsRevoked) Valid added in v0.5.3

func (entity *LegalInvestigationsRevoked) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalPoliceAdditionalOffenses added in v0.5.3

type LegalPoliceAdditionalOffenses struct {
	PayloadHasOtherOffenses Payload `json:"HasOtherOffenses" sql:"-"`
	PayloadList             Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasOtherOffenses *Branch     `json:"-"`
	List             *Collection `json:"-"`

	// Persister specific fields
	ID                 int `json:"-"`
	HasOtherOffensesID int `json:"-" pg:", fk:HasOtherOffenses"`
	ListID             int `json:"-" pg:", fk:List"`
}

LegalPoliceAdditionalOffenses represents the payload for the legal police additional offenses section.

func (*LegalPoliceAdditionalOffenses) ClearNoBranches

func (entity *LegalPoliceAdditionalOffenses) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalPoliceAdditionalOffenses) Marshal added in v0.5.3

func (entity *LegalPoliceAdditionalOffenses) Marshal() Payload

Marshal to payload structure

func (*LegalPoliceAdditionalOffenses) Unmarshal added in v0.5.3

func (entity *LegalPoliceAdditionalOffenses) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalPoliceAdditionalOffenses) Valid added in v0.5.3

func (entity *LegalPoliceAdditionalOffenses) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalPoliceDomesticViolence added in v0.5.3

type LegalPoliceDomesticViolence struct {
	PayloadHasDomesticViolence Payload `json:"HasDomesticViolence" sql:"-"`
	PayloadList                Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasDomesticViolence *Branch     `json:"-"`
	List                *Collection `json:"-"`

	// Persister specific fields
	ID                    int `json:"-"`
	HasDomesticViolenceID int `json:"-"`
	ListID                int `json:"-" pg:", fk:List"`
}

LegalPoliceDomesticViolence represents the payload for the legal police domestic violence section.

func (*LegalPoliceDomesticViolence) ClearNoBranches

func (entity *LegalPoliceDomesticViolence) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalPoliceDomesticViolence) Marshal added in v0.5.3

func (entity *LegalPoliceDomesticViolence) Marshal() Payload

Marshal to payload structure

func (*LegalPoliceDomesticViolence) Unmarshal added in v0.5.3

func (entity *LegalPoliceDomesticViolence) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalPoliceDomesticViolence) Valid added in v0.5.3

func (entity *LegalPoliceDomesticViolence) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalPoliceOffenses added in v0.5.3

type LegalPoliceOffenses struct {
	PayloadHasOffenses Payload `json:"HasOffenses" sql:"-"`
	PayloadList        Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasOffenses *Branch     `json:"-"`
	List        *Collection `json:"-"`

	// Persister specific fields
	ID            int `json:"-"`
	HasOffensesID int `json:"-" pg:", fk:HasOffenses"`
	ListID        int `json:"-" pg:", fk:List"`
}

LegalPoliceOffenses represents the payload for the legal police offenses section.

func (*LegalPoliceOffenses) ClearNoBranches

func (entity *LegalPoliceOffenses) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalPoliceOffenses) Marshal added in v0.5.3

func (entity *LegalPoliceOffenses) Marshal() Payload

Marshal to payload structure

func (*LegalPoliceOffenses) Unmarshal added in v0.5.3

func (entity *LegalPoliceOffenses) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalPoliceOffenses) Valid added in v0.5.3

func (entity *LegalPoliceOffenses) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalTechnologyManipulating added in v0.5.3

type LegalTechnologyManipulating struct {
	PayloadHasManipulating Payload `json:"HasManipulating" sql:"-"`
	PayloadList            Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasManipulating *Branch     `json:"-"`
	List            *Collection `json:"-"`

	// Persister specific fields
	ID                int `json:"-"`
	HasManipulatingID int `json:"-" pg:", fk:HasManipulating"`
	ListID            int `json:"-" pg:", fk:List"`
}

LegalTechnologyManipulating represents the payload for the legal technology manipulating section.

func (*LegalTechnologyManipulating) ClearNoBranches

func (entity *LegalTechnologyManipulating) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalTechnologyManipulating) Marshal added in v0.5.3

func (entity *LegalTechnologyManipulating) Marshal() Payload

Marshal to payload structure

func (*LegalTechnologyManipulating) Unmarshal added in v0.5.3

func (entity *LegalTechnologyManipulating) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalTechnologyManipulating) Valid added in v0.5.3

func (entity *LegalTechnologyManipulating) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalTechnologyUnauthorized added in v0.5.3

type LegalTechnologyUnauthorized struct {
	PayloadHasUnauthorized Payload `json:"HasUnauthorized" sql:"-"`
	PayloadList            Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasUnauthorized *Branch     `json:"-"`
	List            *Collection `json:"-"`

	// Persister specific fields
	ID                int `json:"-"`
	HasUnauthorizedID int `json:"-" pg:", fk:HasUnauthorized"`
	ListID            int `json:"-" pg:", fk:List"`
}

LegalTechnologyUnauthorized represents the payload for the legal technology unauthorized access section.

func (*LegalTechnologyUnauthorized) ClearNoBranches

func (entity *LegalTechnologyUnauthorized) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalTechnologyUnauthorized) Marshal added in v0.5.3

func (entity *LegalTechnologyUnauthorized) Marshal() Payload

Marshal to payload structure

func (*LegalTechnologyUnauthorized) Unmarshal added in v0.5.3

func (entity *LegalTechnologyUnauthorized) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalTechnologyUnauthorized) Valid added in v0.5.3

func (entity *LegalTechnologyUnauthorized) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LegalTechnologyUnlawful added in v0.5.3

type LegalTechnologyUnlawful struct {
	PayloadHasUnlawful Payload `json:"HasUnlawful" sql:"-"`
	PayloadList        Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasUnlawful *Branch     `json:"-"`
	List        *Collection `json:"-"`

	// Persister specific fields
	ID            int `json:"-"`
	HasUnlawfulID int `json:"-" pg:", fk:HasUnlawful"`
	ListID        int `json:"-" pg:", fk:List"`
}

LegalTechnologyUnlawful represents the payload for the legal technology unlawful use section.

func (*LegalTechnologyUnlawful) ClearNoBranches

func (entity *LegalTechnologyUnlawful) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*LegalTechnologyUnlawful) Marshal added in v0.5.3

func (entity *LegalTechnologyUnlawful) Marshal() Payload

Marshal to payload structure

func (*LegalTechnologyUnlawful) Unmarshal added in v0.5.3

func (entity *LegalTechnologyUnlawful) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*LegalTechnologyUnlawful) Valid added in v0.5.3

func (entity *LegalTechnologyUnlawful) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Location added in v0.5.3

type Location struct {
	ID              int    `json:"-"`
	Layout          string `json:"layout"`
	Street1         string `json:"street,omitempty"`
	Street2         string `json:"street2,omitempty"`
	City            string `json:"city,omitempty"`
	State           string `json:"state,omitempty"`
	Zipcode         string `json:"zipcode,omitempty"`
	County          string `json:"county,omitempty"`
	Country         string `json:"country"`
	CountryComments string `json:"countryComments,omitempty"`
	Validated       bool   `json:"validated,omitempty"`
}

Location is a basic input.

func (*Location) IsDomestic added in v0.5.3

func (entity *Location) IsDomestic() bool

IsDomestic returns whether the location is in the United States.

func (*Location) IsInternational added in v0.5.3

func (entity *Location) IsInternational() bool

IsInternational returns whether the location is outside the United States and not a postal address.

func (*Location) IsPostOffice added in v0.5.3

func (entity *Location) IsPostOffice() bool

IsPostOffice returns whether the location is APO, FPO, or DPO.

func (*Location) Marshal added in v0.5.3

func (entity *Location) Marshal() Payload

Marshal to payload structure

func (*Location) Unmarshal added in v0.5.3

func (entity *Location) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Location) Valid added in v0.5.3

func (entity *Location) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type LogFields added in v0.5.3

type LogFields map[string]interface{}

LogFields are named keys to hold additional information to be reported in the log messages.

type LogService added in v0.5.3

type LogService interface {
	AddField(name string, value interface{})
	Print(message string, fields LogFields)
	PrintError(message string, err error, fields LogFields)
	Debug(message string, fields LogFields)
	DebugError(message string, err error, fields LogFields)
	Warn(message string, fields LogFields)
	WarnError(message string, err error, fields LogFields)
	Info(message string, fields LogFields)
	InfoError(message string, err error, fields LogFields)
	Fatal(message string, fields LogFields)
	FatalError(message string, err error, fields LogFields)
	Panic(message string, fields LogFields)
	PanicError(message string, err error, fields LogFields)
}

LogService represents common methods for a logging service.

type Marshaller added in v0.5.3

type Marshaller interface {
	Unmarshal([]byte) error
	Marshal() Payload
}

Marshaller is structure which can marshal and unmarshal JSON.

type Migration added in v0.5.3

type Migration struct {
	Env Settings
}

Migration is a service used for data storage migrations.

func (Migration) CurrentVersion added in v0.5.3

func (service Migration) CurrentVersion(dbURI, directory, environment, schema string) (int64, error)

CurrentVersion gets the database current version according to the migration status

func (Migration) Up added in v0.5.3

func (service Migration) Up(dbURI, directory, environment, schema string) error

Up attempts to push any pending updates to the database

type MilitaryDisciplinary added in v0.5.3

type MilitaryDisciplinary struct {
	PayloadHasDisciplinary Payload `json:"HasDisciplinary" sql:"-"`
	PayloadList            Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasDisciplinary *Branch     `json:"-"`
	List            *Collection `json:"-"`

	// Persister specific fields
	ID                int `json:"-"`
	HasDisciplinaryID int `json:"-" pg:", fk:HasDisciplinary"`
	ListID            int `json:"-" pg:", fk:List"`
}

MilitaryDisciplinary represents the payload for the military disposition section.

func (*MilitaryDisciplinary) ClearNoBranches

func (entity *MilitaryDisciplinary) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*MilitaryDisciplinary) Marshal added in v0.5.3

func (entity *MilitaryDisciplinary) Marshal() Payload

Marshal to payload structure

func (*MilitaryDisciplinary) Unmarshal added in v0.5.3

func (entity *MilitaryDisciplinary) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*MilitaryDisciplinary) Valid added in v0.5.3

func (entity *MilitaryDisciplinary) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type MilitaryForeign added in v0.5.3

type MilitaryForeign struct {
	PayloadList Payload `json:"List" sql:"-"`

	// Validator specific fields
	List *Collection `json:"-"`

	// Persister specific fields
	ID     int `json:"-"`
	ListID int `json:"-" pg:", fk:List"`
}

MilitaryForeign represents the payload for the military foreign section.

func (*MilitaryForeign) ClearNoBranches

func (entity *MilitaryForeign) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*MilitaryForeign) Marshal added in v0.5.3

func (entity *MilitaryForeign) Marshal() Payload

Marshal to payload structure

func (*MilitaryForeign) Unmarshal added in v0.5.3

func (entity *MilitaryForeign) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*MilitaryForeign) Valid added in v0.5.3

func (entity *MilitaryForeign) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type MilitaryHistory added in v0.5.3

type MilitaryHistory struct {
	PayloadHasServed Payload `json:"HasServed" sql:"-"`
	PayloadList      Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasServed *Branch     `json:"-"`
	List      *Collection `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	HasServedID int `json:"-" pg:", fk:HasServed"`
	ListID      int `json:"-" pg:", fk:List"`
}

MilitaryHistory represents the payload for the military history section.

func (*MilitaryHistory) ClearNoBranches

func (entity *MilitaryHistory) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*MilitaryHistory) Marshal added in v0.5.3

func (entity *MilitaryHistory) Marshal() Payload

Marshal to payload structure

func (*MilitaryHistory) Unmarshal added in v0.5.3

func (entity *MilitaryHistory) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*MilitaryHistory) Valid added in v0.5.3

func (entity *MilitaryHistory) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type MilitarySelective added in v0.5.3

type MilitarySelective struct {
	PayloadWasBornAfter               Payload `json:"WasBornAfter" sql:"-"`
	PayloadHasRegistered              Payload `json:"HasRegistered" sql:"-"`
	PayloadRegistrationNumber         Payload `json:"RegistrationNumber" sql:"-"`
	PayloadExplanation                Payload `json:"Explanation" sql:"-"`
	PayloadHasRegisteredNotApplicable Payload `json:"HasRegisteredNotApplicable" sql:"-"`

	// Validator specific fields
	WasBornAfter               *Branch        `json:"-"`
	HasRegistered              *Branch        `json:"-"`
	RegistrationNumber         *Text          `json:"-"`
	Explanation                *Textarea      `json:"-"`
	HasRegisteredNotApplicable *NotApplicable `json:"-"`

	// Persister specific fields
	ID                           int `json:"-"`
	WasBornAfterID               int `json:"-" pg:", fk:WasBornAfter"`
	HasRegisteredID              int `json:"-" pg:", fk:HasRegistered"`
	RegistrationNumberID         int `json:"-" pg:", fk:RegistrationNumber"`
	ExplanationID                int `json:"-" pg:", fk:Explanation"`
	HasRegisteredNotApplicableID int `json:"-" pg:", fk:HasRegisteredNotApplicable"`
}

MilitarySelective represents the payload for the military service section.

func (*MilitarySelective) ClearNoBranches

func (entity *MilitarySelective) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*MilitarySelective) Marshal added in v0.5.3

func (entity *MilitarySelective) Marshal() Payload

Marshal to payload structure

func (*MilitarySelective) Unmarshal added in v0.5.3

func (entity *MilitarySelective) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*MilitarySelective) Valid added in v0.5.3

func (entity *MilitarySelective) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Name added in v0.5.3

type Name struct {
	ID                int    `json:"-"`
	First             string `json:"first"`
	FirstInitialOnly  bool   `json:"firstInitialOnly"`
	Middle            string `json:"middle"`
	MiddleInitialOnly bool   `json:"middleInitialOnly"`
	NoMiddleName      bool   `json:"noMiddleName"`
	Last              string `json:"last"`
	Suffix            string `json:"suffix"`
	SuffixOther       string `json:"suffixOther"`
}

Name is a basic input.

func (*Name) Marshal added in v0.5.3

func (entity *Name) Marshal() Payload

Marshal to payload structure

func (*Name) Unmarshal added in v0.5.3

func (entity *Name) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Name) Valid added in v0.5.3

func (entity *Name) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type NotApplicable added in v0.5.3

type NotApplicable struct {
	ID         int  `json:"-"`
	Applicable bool `json:"applicable"`
}

NotApplicable is a basic input.

func (*NotApplicable) Marshal added in v0.5.3

func (entity *NotApplicable) Marshal() Payload

Marshal to payload structure

func (*NotApplicable) Unmarshal added in v0.5.3

func (entity *NotApplicable) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*NotApplicable) Valid added in v0.5.3

func (entity *NotApplicable) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Number added in v0.5.3

type Number struct {
	ID    int    `json:"-"`
	Value string `json:"value"`
}

Number is a basic input.

func (*Number) Marshal added in v0.5.3

func (entity *Number) Marshal() Payload

Marshal to payload structure

func (*Number) Unmarshal added in v0.5.3

func (entity *Number) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Number) Valid added in v0.5.3

func (entity *Number) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Payload added in v0.5.3

type Payload struct {
	Type  string          `json:"type"`
	Props json.RawMessage `json:"props,omitempty"`
}

Payload is a basic structure to encapsulate a generic structure.

func MarshalPayloadEntity added in v0.5.3

func MarshalPayloadEntity(typeName string, entity Entity) Payload

MarshalPayloadEntity basic payload structure with an entity.

func (Payload) Entity added in v0.5.3

func (payload Payload) Entity() (Entity, error)

Entity returns the appropriate entity as an interface based on its type.

func (Payload) SafeEntity added in v0.5.3

func (payload Payload) SafeEntity() (Entity, error)

SafeEntity returns the appropriate entity as an interface based on its type and is at the section level.

func (*Payload) Unmarshal added in v0.5.3

func (payload *Payload) Unmarshal(raw []byte) error

Unmarshal basic payload structure.

func (Payload) UnmarshalEntity added in v0.5.3

func (payload Payload) UnmarshalEntity(raw []byte) (Entity, error)

UnmarshalEntity returns the appropriate entity as an interface based on its type.

func (Payload) Valid added in v0.5.3

func (payload Payload) Valid() (bool, error)

Valid return whether the entity validates.

type PdfService added in v0.5.6

type PdfService interface {
	GenerateReleases(account Account, app Application) ([]Attachment, error)
}

PdfService declares operations to create and query archival PDFs.

type PhysicalAddress added in v0.5.3

type PhysicalAddress struct {
	PayloadHasDifferentAddress Payload `json:"HasDifferentAddress" sql:"-"`
	PayloadAddress             Payload `json:"Address" sql:"-"`
	PayloadTelephone           Payload `json:"Telephone" sql:"-"`

	// Validator specific fields
	HasDifferentAddress *Branch    `json:"-"`
	Address             *Location  `json:"-"`
	Telephone           *Telephone `json:"-"`

	// Persister specific fields
	ID                    int `json:"-"`
	AccountID             int `json:"-"`
	HasDifferentAddressID int `json:"-" pg:"fk:HasDifferentAddress"`
	AddressID             int `json:"-" pg:"fk:Address"`
	TelephoneID           int `json:"-" pg:"fk:Telephone"`
}

PhysicalAddress is a basic input.

func (*PhysicalAddress) Marshal added in v0.5.3

func (entity *PhysicalAddress) Marshal() Payload

Marshal to payload structure

func (*PhysicalAddress) Unmarshal added in v0.5.3

func (entity *PhysicalAddress) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*PhysicalAddress) Valid added in v0.5.3

func (entity *PhysicalAddress) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type PsychologicalCompetence added in v0.5.3

type PsychologicalCompetence struct {
	PayloadIsIncompetent Payload `json:"IsIncompetent" sql:"-"`
	PayloadList          Payload `json:"List" sql:"-"`

	// Validator specific fields
	IsIncompetent *Branch     `json:"-"`
	List          *Collection `json:"-"`

	// Persister specific fields
	ID              int `json:"-"`
	IsIncompetentID int `json:"-" pg:", fk:IsIncompetent"`
	ListID          int `json:"-" pg:", fk:List"`
}

PsychologicalCompetence represents the payload for the psychological competence section.

func (*PsychologicalCompetence) ClearNoBranches

func (entity *PsychologicalCompetence) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*PsychologicalCompetence) Marshal added in v0.5.3

func (entity *PsychologicalCompetence) Marshal() Payload

Marshal to payload structure

func (*PsychologicalCompetence) Unmarshal added in v0.5.3

func (entity *PsychologicalCompetence) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*PsychologicalCompetence) Valid added in v0.5.3

func (entity *PsychologicalCompetence) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type PsychologicalConsultations added in v0.5.3

type PsychologicalConsultations struct {
	PayloadConsulted Payload `json:"Consulted" sql:"-"`
	PayloadList      Payload `json:"List" sql:"-"`

	// Validator specific fields
	Consulted *Branch     `json:"-"`
	List      *Collection `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	ConsultedID int `json:"-" pg:", fk:Consulted"`
	ListID      int `json:"-" pg:", fk:List"`
}

PsychologicalConsultations represents the payload for the psychological consultations section.

func (*PsychologicalConsultations) ClearNoBranches

func (entity *PsychologicalConsultations) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*PsychologicalConsultations) Marshal added in v0.5.3

func (entity *PsychologicalConsultations) Marshal() Payload

Marshal to payload structure

func (*PsychologicalConsultations) Unmarshal added in v0.5.3

func (entity *PsychologicalConsultations) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*PsychologicalConsultations) Valid added in v0.5.3

func (entity *PsychologicalConsultations) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type PsychologicalDiagnoses added in v0.5.3

type PsychologicalDiagnoses struct {
	PayloadDiagnosed     Payload `json:"Diagnosed" sql:"-"`
	PayloadDidNotConsult Payload `json:"DidNotConsult" sql:"-"`
	PayloadDiagnosisList Payload `json:"DiagnosisList" sql:"-"`
	PayloadInTreatment   Payload `json:"InTreatment" sql:"-"`
	PayloadTreatmentList Payload `json:"TreatmentList" sql:"-"`

	// Validator specific fields
	Diagnosed     *Branch     `json:"-"`
	DidNotConsult *Branch     `json:"-"`
	DiagnosisList *Collection `json:"-"`
	InTreatment   *Branch     `json:"-"`
	TreatmentList *Collection `json:"-"`

	// Persister specific fields
	ID              int `json:"-"`
	DiagnosedID     int `json:"-" pg:", fk:Diagnosed"`
	DidNotConsultID int `json:"-" pg:", fk:DidNotConsult"`
	DiagnosisListID int `json:"-" pg:", fk:DiagnosisList"`
	InTreatmentID   int `json:"-" pg:", fk:InTreatment"`
	TreatmentListID int `json:"-" pg:", fk:TreatmentList"`
}

PsychologicalDiagnoses represents the payload for the psychological diagnosis section.

func (*PsychologicalDiagnoses) ClearNoBranches

func (entity *PsychologicalDiagnoses) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*PsychologicalDiagnoses) Marshal added in v0.5.3

func (entity *PsychologicalDiagnoses) Marshal() Payload

Marshal to payload structure

func (*PsychologicalDiagnoses) Unmarshal added in v0.5.3

func (entity *PsychologicalDiagnoses) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*PsychologicalDiagnoses) Valid added in v0.5.3

func (entity *PsychologicalDiagnoses) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type PsychologicalExisting added in v0.5.3

type PsychologicalExisting struct {
	PayloadHasCondition            Payload `json:"HasCondition" sql:"-"`
	PayloadReceivedTreatment       Payload `json:"ReceivedTreatment" sql:"-"`
	PayloadExplanation             Payload `json:"Explanation" sql:"-"`
	PayloadTreatmentList           Payload `json:"TreatmentList" sql:"-"`
	PayloadDidNotFollow            Payload `json:"DidNotFollow" sql:"-"`
	PayloadDidNotFollowExplanation Payload `json:"DidNotFollowExplanation" sql:"-"`

	// Validator specific fields
	HasCondition            *Branch     `json:"-"`
	ReceivedTreatment       *Radio      `json:"-"`
	Explanation             *Textarea   `json:"-"`
	TreatmentList           *Collection `json:"-"`
	DidNotFollow            *Branch     `json:"-"`
	DidNotFollowExplanation *Textarea   `json:"-"`

	// Persister specific fields
	ID                        int `json:"-"`
	HasConditionID            int `json:"-" pg:", fk:HasCondition"`
	ReceivedTreatmentID       int `json:"-" pg:", fk:ReceivedTreatment"`
	ExplanationID             int `json:"-" pg:", fk:Explanation"`
	TreatmentListID           int `json:"-" pg:", fk:TreatmentList"`
	DidNotFollowID            int `json:"-" pg:", fk:DidNotFollow"`
	DidNotFollowExplanationID int `json:"-" pg:", fk:DidNotFollowExplanation"`
}

PsychologicalExisting represents the payload for the psychological existing conditions section.

func (*PsychologicalExisting) Marshal added in v0.5.3

func (entity *PsychologicalExisting) Marshal() Payload

Marshal to payload structure

func (*PsychologicalExisting) Unmarshal added in v0.5.3

func (entity *PsychologicalExisting) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*PsychologicalExisting) Valid added in v0.5.3

func (entity *PsychologicalExisting) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type PsychologicalHospitalizations added in v0.5.3

type PsychologicalHospitalizations struct {
	PayloadHospitalized Payload `json:"Hospitalized" sql:"-"`
	PayloadList         Payload `json:"List" sql:"-"`

	// Validator specific fields
	Hospitalized *Branch     `json:"-"`
	List         *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	HospitalizedID int `json:"-" pg:", fk:Hospitalized"`
	ListID         int `json:"-" pg:", fk:List"`
}

PsychologicalHospitalizations represents the payload for the psychological hospitalizations section.

func (*PsychologicalHospitalizations) ClearNoBranches

func (entity *PsychologicalHospitalizations) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*PsychologicalHospitalizations) Marshal added in v0.5.3

func (entity *PsychologicalHospitalizations) Marshal() Payload

Marshal to payload structure

func (*PsychologicalHospitalizations) Unmarshal added in v0.5.3

func (entity *PsychologicalHospitalizations) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*PsychologicalHospitalizations) Valid added in v0.5.3

func (entity *PsychologicalHospitalizations) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Radio added in v0.5.3

type Radio struct {
	ID      int    `json:"-"`
	Value   string `json:"value"`
	Checked bool   `json:"checked,omitempty"`
}

Radio is a basic input.

func (*Radio) Marshal added in v0.5.3

func (entity *Radio) Marshal() Payload

Marshal to payload structure

func (*Radio) Unmarshal added in v0.5.3

func (entity *Radio) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Radio) Valid added in v0.5.3

func (entity *Radio) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ReasonLeft added in v0.5.3

type ReasonLeft struct {
	PayloadComments          Payload `json:"Comments" sql:"-"`
	PayloadReasons           Payload `json:"Reasons" sql:"-"`
	PayloadReasonDescription Payload `json:"ReasonDescription" sql:"-"`

	// Validator specific fields
	Comments          *Textarea   `json:"-"`
	Reasons           *Collection `json:"-"`
	ReasonDescription *Textarea   `json:"-"`

	// Persister specific fields
	ID                  int `json:"-"`
	AccountID           int `json:"-"`
	CommentsID          int `json:"-"`
	ReasonsID           int `json:"-"`
	ReasonDescriptionID int `json:"-"`
}

ReasonLeft is a basic input.

func (*ReasonLeft) Marshal added in v0.5.3

func (entity *ReasonLeft) Marshal() Payload

Marshal to payload structure

func (*ReasonLeft) Unmarshal added in v0.5.3

func (entity *ReasonLeft) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*ReasonLeft) Valid added in v0.5.3

func (entity *ReasonLeft) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Rejector

type Rejector interface {
	ClearNoBranches() error
}

Rejector interface allows an entity to have nos cleared when the application is kicked back

type RelationshipsCohabitants added in v0.5.3

type RelationshipsCohabitants struct {
	PayloadHasCohabitant  Payload `json:"HasCohabitant" sql:"-"`
	PayloadCohabitantList Payload `json:"CohabitantList" sql:"-"`

	// Validator specific fields
	HasCohabitant  *Branch     `json:"-"`
	CohabitantList *Collection `json:"-"`

	// Persister specific fields
	ID               int `json:"-"`
	HasCohabitantID  int `json:"-" pg:", fk:HasCohabitant"`
	CohabitantListID int `json:"-" pg:", fk:CohabitantList"`
}

RelationshipsCohabitants represents the payload for the relationships cohabitants section.

func (*RelationshipsCohabitants) ClearNoBranches

func (entity *RelationshipsCohabitants) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*RelationshipsCohabitants) Marshal added in v0.5.3

func (entity *RelationshipsCohabitants) Marshal() Payload

Marshal to payload structure

func (*RelationshipsCohabitants) Unmarshal added in v0.5.3

func (entity *RelationshipsCohabitants) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*RelationshipsCohabitants) Valid added in v0.5.3

func (entity *RelationshipsCohabitants) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type RelationshipsMarital added in v0.5.3

type RelationshipsMarital struct {
	PayloadStatus       Payload `json:"Status" sql:"-"`
	PayloadCivilUnion   Payload `json:"CivilUnion" sql:"-"`
	PayloadDivorcedList Payload `json:"DivorcedList" sql:"-"`

	// Validator specific fields
	Status       *Radio      `json:"-"`
	CivilUnion   *CivilUnion `json:"-"`
	DivorcedList *Collection `json:"-"`

	// Persister specific fields
	ID             int `json:"-"`
	StatusID       int `json:"-" pg:", fk:Status"`
	CivilUnionID   int `json:"-" pg:", fk:CivilUnion"`
	DivorcedListID int `json:"-" pg:", fk:DivorcedList"`
}

RelationshipsMarital represents the payload for the relationships marital section.

func (*RelationshipsMarital) ClearNoBranches

func (entity *RelationshipsMarital) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*RelationshipsMarital) Marshal added in v0.5.3

func (entity *RelationshipsMarital) Marshal() Payload

Marshal to payload structure

func (*RelationshipsMarital) Unmarshal added in v0.5.3

func (entity *RelationshipsMarital) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*RelationshipsMarital) Valid added in v0.5.3

func (entity *RelationshipsMarital) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type RelationshipsPeople added in v0.5.3

type RelationshipsPeople struct {
	PayloadList Payload `json:"List" sql:"-"`

	// Validator specific fields
	List *Collection `json:"-"`

	// Persister specific fields
	ID     int `json:"-"`
	ListID int `json:"-" pg:", fk:List"`
}

RelationshipsPeople represents the payload for the relationships people section.

func (*RelationshipsPeople) ClearNoBranches

func (entity *RelationshipsPeople) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*RelationshipsPeople) Marshal added in v0.5.3

func (entity *RelationshipsPeople) Marshal() Payload

Marshal to payload structure

func (*RelationshipsPeople) Unmarshal added in v0.5.3

func (entity *RelationshipsPeople) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*RelationshipsPeople) Valid added in v0.5.3

func (entity *RelationshipsPeople) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type RelationshipsRelatives added in v0.5.3

type RelationshipsRelatives struct {
	PayloadList Payload `json:"List" sql:"-"`

	// Validator specific fields
	List *Collection `json:"-"`

	// Persister specific fields
	ID     int `json:"-"`
	ListID int `json:"-" pg:", fk:List"`
}

RelationshipsRelatives represents the payload for the relationships relatives section.

func (*RelationshipsRelatives) ClearNoBranches

func (entity *RelationshipsRelatives) ClearNoBranches() error

ClearNoBranches clears any questions answered nos on a kickback

func (*RelationshipsRelatives) Marshal added in v0.5.3

func (entity *RelationshipsRelatives) Marshal() Payload

Marshal to payload structure

func (*RelationshipsRelatives) Unmarshal added in v0.5.3

func (entity *RelationshipsRelatives) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*RelationshipsRelatives) Valid added in v0.5.3

func (entity *RelationshipsRelatives) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SAMLResponseType added in v1.0.6

type SAMLResponseType string

SAMLResponseType represents the type of a SAML response received from the identity server

const (
	// AuthnSAMLResponseType represents an Aunthn Response
	AuthnSAMLResponseType SAMLResponseType = "AuthnSAMLResponseType"
	// LogoutSAMLResponseType represents a Logout Response
	LogoutSAMLResponseType SAMLResponseType = "LogoutSAMLResponseType"
)

type SSN added in v0.5.3

type SSN struct {
	ID            int    `json:"-"`
	First         string `json:"first"`
	Middle        string `json:"middle"`
	Last          string `json:"last"`
	NotApplicable bool   `json:"notApplicable"`
}

SSN is a basic input.

func (*SSN) Marshal added in v0.5.3

func (entity *SSN) Marshal() Payload

Marshal to payload structure

func (*SSN) Unmarshal added in v0.5.3

func (entity *SSN) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SSN) Valid added in v0.5.3

func (entity *SSN) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SamlService added in v0.5.3

type SamlService interface {
	CreateAuthenticationRequest() (string, string, error)
	ValidateAuthenticationResponse(encoded string) (string, string, error)
	CreateSLORequest(string, string) (string, string, error)
	ResponseType(encoded string) (SAMLResponseType, error)
}

SamlService represents a service to request and validate SAML responses.

type Section

type Section interface {
	Entity
}

Section interface represents a top level section in the form Right now that's just an entity, but it would be nice if we could separate Sections from things like text fields in the future.

type SectionInformation added in v0.5.6

type SectionInformation struct {
	Name       string
	Subsection string
	Payload    string
	// contains filtered or unexported fields
}

SectionInformation represents a structure to quickly organize the different sections and subsections with the payload type(s).

func Catalogue added in v0.5.6

func Catalogue() []SectionInformation

Catalogue eturns an array of the sub-sections of the form

type Sentence added in v0.5.3

type Sentence struct {
	PayloadDescription          Payload `json:"Description" sql:"-"`
	PayloadExceedsYear          Payload `json:"ExceedsYear" sql:"-"`
	PayloadIncarcerated         Payload `json:"Incarcerated" sql:"-"`
	PayloadIncarcerationDates   Payload `json:"IncarcerationDates" sql:"-"`
	PayloadIncarcerationDatesNA Payload `json:"IncarcerationDatesNA" sql:"-"`
	PayloadProbationDates       Payload `json:"ProbationDates" sql:"-"`
	PayloadProbationDatesNA     Payload `json:"ProbationDatesNA" sql:"-"`

	// Validator specific fields
	Description          *Textarea      `json:"-" sql:"-"`
	ExceedsYear          *Branch        `json:"-" sql:"-"`
	Incarcerated         *Branch        `json:"-" sql:"-"`
	IncarcerationDates   *DateRange     `json:"-" sql:"-"`
	IncarcerationDatesNA *NotApplicable `json:"-" sql:"-"`
	ProbationDates       *DateRange     `json:"-" sql:"-"`
	ProbationDatesNA     *NotApplicable `json:"-" sql:"-"`

	// Persister specific fields
	ID                     int `json:"-"`
	AccountID              int `json:"-"`
	DescriptionID          int `json:"-"`
	ExceedsYearID          int `json:"-"`
	IncarceratedID         int `json:"-"`
	IncarcerationDatesID   int `json:"-"`
	IncarcerationDatesNAID int `json:"-"`
	ProbationDatesID       int `json:"-"`
	ProbationDatesNAID     int `json:"-"`
}

Sentence is a basic input.

func (*Sentence) Marshal added in v0.5.3

func (entity *Sentence) Marshal() Payload

Marshal to payload structure

func (*Sentence) Unmarshal added in v0.5.3

func (entity *Sentence) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Sentence) Valid added in v0.5.3

func (entity *Sentence) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Serializer

type Serializer interface {
	// SerializeApplication turns an Application into bytes
	SerializeApplication(Application) ([]byte, error)
	// DeserializeApplication turns bytes into an Application
	DeserializeApplication(accountID int, formType string, formVersion string, body []byte) (Application, error)

	// SerializeAttachment turns an attachment into two byte arrays for storage in the db
	// The first one is the meatadata, and the second one is the body
	SerializeAttachment(attachment Attachment) ([]byte, []byte, error)
	// DeserializeAttachment turns bytes into an Attachment
	DeserializeAttachment(accountID int, attachmentID int, metadata []byte, body []byte) (Attachment, error)
}

Serializer is an interface that sits between the domain models and the database. It is able to serialize and deserialize Applications and Attachments

type Settings added in v0.5.3

type Settings interface {
	Configure()
	Has(string) bool
	String(string) string
	True(string) bool
	Int(string) int
}

Settings represents environments settings to pull configuration information. This may be via environment variables or a specific environment like CloudFoundry.

type Signature added in v0.5.3

type Signature struct {
	PayloadName Payload `json:"Name" sql:"-"`
	PayloadDate Payload `json:"Date" sql:"-"`

	// Validator specific fields
	Name *Text        `json:"-" sql:"-"`
	Date *DateControl `json:"-" sql:"-"`

	// Persister specific fields
	ID        int `json:"-"`
	AccountID int `json:"-"`
	NameID    int `json:"-"`
	DateID    int `json:"-"`
}

Signature is a basic input.

func (*Signature) Marshal added in v0.5.3

func (entity *Signature) Marshal() Payload

Marshal to payload structure

func (*Signature) Unmarshal added in v0.5.3

func (entity *Signature) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Signature) Valid added in v0.5.3

func (entity *Signature) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type StorageService

type StorageService interface {
	// CreateApplication creates an application in the db. Errors if already exists.
	CreateApplication(app Application) error
	// UpdateApplication replaces an existing application with the passed in one.
	UpdateApplication(app Application) error
	// SaveSection replaces a single section in the given application with the passed in section
	SaveSection(section Section, accountID int) error
	// LoadApplication returns the given application from the db.
	LoadApplication(accountID int) (Application, error)
	// DeleteApplication deletes all the form data for a given account
	DeleteApplication(accountID int) error

	// CreateAttachment creates an attachment in the database
	CreateAttachment(attachment *Attachment) error
	// LoadAttachment loads an attachment from the database
	LoadAttachment(accountID int, attachmentID int) (Attachment, error)
	// ListAttachmentMetadata returns a slice of attachments' metadata for a given account.
	ListAttachmentsMetadata(accountID int) ([]Attachment, error)
	//DeleteAttachment deletes an attachment for the given account
	DeleteAttachment(accountID int, attachmentID int) error
}

StorageService stores eapp related data

type Submission added in v0.5.3

type Submission struct {
	PayloadAdditionalComments Payload `json:"AdditionalComments" sql:"-"`
	PayloadGeneral            Payload `json:"General" sql:"-"`
	PayloadMedical            Payload `json:"Medical" sql:"-"`
	PayloadCredit             Payload `json:"Credit" sql:"-"`
	PayloadAttachments        Payload `json:"Attachments" sql:"-"`

	// Validator specific fields
	AdditionalComments *SubmissionAdditionalComments `json:"-" sql:"-"`
	General            *SubmissionGeneral            `json:"-" sql:"-"`
	Medical            *SubmissionMedical            `json:"-" sql:"-"`
	Credit             *SubmissionCredit             `json:"-" sql:"-"`
	Attachments        *SubmissionAttachments        `json:"-" sql:"-"`

	// Persister specific fields
	ID                   int    `json:"-"`
	AdditionalCommentsID int    `json:"-"`
	GeneralID            int    `json:"-"`
	MedicalID            int    `json:"-"`
	CreditID             int    `json:"-"`
	AttachmentsID        int    `json:"-"`
	Hash                 string `json:"-"`
}

Submission represents the payload for the submission section.

func (*Submission) Marshal added in v0.5.3

func (entity *Submission) Marshal() Payload

Marshal to payload structure

func (*Submission) Unmarshal added in v0.5.3

func (entity *Submission) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Submission) Valid added in v0.5.3

func (entity *Submission) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubmissionAdditionalComments added in v0.5.3

type SubmissionAdditionalComments struct {
	PayloadSignature Payload `json:"Signature" sql:"-"`

	// Validator specific fields
	Signature *Signature `json:"-" sql:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	SignatureID int `json:"-"`
}

SubmissionAdditionalComments represents the payload for the submission additional comments section.

func (*SubmissionAdditionalComments) Marshal added in v0.5.3

func (entity *SubmissionAdditionalComments) Marshal() Payload

Marshal to payload structure

func (*SubmissionAdditionalComments) Unmarshal added in v0.5.3

func (entity *SubmissionAdditionalComments) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubmissionAdditionalComments) Valid added in v0.5.3

func (entity *SubmissionAdditionalComments) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubmissionAttachments added in v0.5.3

type SubmissionAttachments struct {
	PayloadMethod Payload `json:"Method" sql:"-"`

	// Validator specific fields
	Method *Text `json:"-" sql:"-"`

	// Persister specific fields
	ID       int `json:"-"`
	MethodID int `json:"-"`
}

SubmissionAttachments represents the payload for the submission attachments section.

func (*SubmissionAttachments) Marshal added in v0.5.3

func (entity *SubmissionAttachments) Marshal() Payload

Marshal to payload structure

func (*SubmissionAttachments) Unmarshal added in v0.5.3

func (entity *SubmissionAttachments) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubmissionAttachments) Valid added in v0.5.3

func (entity *SubmissionAttachments) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubmissionCredit added in v0.5.3

type SubmissionCredit struct {
	PayloadSignature Payload `json:"Signature" sql:"-"`

	// Validator specific fields
	Signature *Signature `json:"-" sql:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	SignatureID int `json:"-"`
}

SubmissionCredit represents the payload for the submission credit release section.

func (*SubmissionCredit) Marshal added in v0.5.3

func (entity *SubmissionCredit) Marshal() Payload

Marshal to payload structure

func (*SubmissionCredit) Unmarshal added in v0.5.3

func (entity *SubmissionCredit) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubmissionCredit) Valid added in v0.5.3

func (entity *SubmissionCredit) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubmissionGeneral added in v0.5.3

type SubmissionGeneral struct {
	PayloadSignature Payload `json:"Signature" sql:"-"`

	// Validator specific fields
	Signature *Signature `json:"-" sql:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	SignatureID int `json:"-"`
}

SubmissionGeneral represents the payload for the submission general release section.

func (*SubmissionGeneral) Marshal added in v0.5.3

func (entity *SubmissionGeneral) Marshal() Payload

Marshal to payload structure

func (*SubmissionGeneral) Unmarshal added in v0.5.3

func (entity *SubmissionGeneral) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubmissionGeneral) Valid added in v0.5.3

func (entity *SubmissionGeneral) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubmissionMedical added in v0.5.3

type SubmissionMedical struct {
	PayloadSignature Payload `json:"Signature" sql:"-"`

	// Validator specific fields
	Signature *Signature `json:"-" sql:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	SignatureID int `json:"-"`
}

SubmissionMedical represents the payload for the submission medical release section.

func (*SubmissionMedical) Marshal added in v0.5.3

func (entity *SubmissionMedical) Marshal() Payload

Marshal to payload structure

func (*SubmissionMedical) Unmarshal added in v0.5.3

func (entity *SubmissionMedical) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubmissionMedical) Valid added in v0.5.3

func (entity *SubmissionMedical) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceAlcoholAdditional added in v0.5.3

type SubstanceAlcoholAdditional struct {
	PayloadReceivedTreatment Payload `json:"ReceivedTreatment" sql:"-"`
	PayloadList              Payload `json:"List" sql:"-"`

	// Validator specific fields
	ReceivedTreatment *Branch     `json:"-"`
	List              *Collection `json:"-"`

	// Persister specific fields
	ID                  int `json:"-"`
	ReceivedTreatmentID int `json:"-" pg:", fk:ReceivedTreatment"`
	ListID              int `json:"-" pg:", fk:List"`
}

SubstanceAlcoholAdditional represents the payload for the substance alcohol additional section.

func (*SubstanceAlcoholAdditional) ClearNoBranches

func (entity *SubstanceAlcoholAdditional) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceAlcoholAdditional) Marshal added in v0.5.3

func (entity *SubstanceAlcoholAdditional) Marshal() Payload

Marshal to payload structure

func (*SubstanceAlcoholAdditional) Unmarshal added in v0.5.3

func (entity *SubstanceAlcoholAdditional) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceAlcoholAdditional) Valid added in v0.5.3

func (entity *SubstanceAlcoholAdditional) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceAlcoholNegative added in v0.5.3

type SubstanceAlcoholNegative struct {
	PayloadHasImpacts Payload `json:"HasImpacts" sql:"-"`
	PayloadList       Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasImpacts *Branch     `json:"-"`
	List       *Collection `json:"-"`

	// Persister specific fields
	ID           int `json:"-"`
	HasImpactsID int `json:"-" pg:", fk:HasImpacts"`
	ListID       int `json:"-" pg:", fk:List"`
}

SubstanceAlcoholNegative represents the payload for the substance alcohol negative section.

func (*SubstanceAlcoholNegative) ClearNoBranches

func (entity *SubstanceAlcoholNegative) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceAlcoholNegative) Marshal added in v0.5.3

func (entity *SubstanceAlcoholNegative) Marshal() Payload

Marshal to payload structure

func (*SubstanceAlcoholNegative) Unmarshal added in v0.5.3

func (entity *SubstanceAlcoholNegative) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceAlcoholNegative) Valid added in v0.5.3

func (entity *SubstanceAlcoholNegative) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceAlcoholOrdered added in v0.5.3

type SubstanceAlcoholOrdered struct {
	PayloadHasBeenOrdered Payload `json:"HasBeenOrdered" sql:"-"`
	PayloadList           Payload `json:"List" sql:"-"`

	// Validator specific fields
	HasBeenOrdered *Branch     `json:"-"`
	List           *Collection `json:"-"`

	// Persister specific fields
	ID               int `json:"-"`
	HasBeenOrderedID int `json:"-" pg:", fk:HasBeenOrdered"`
	ListID           int `json:"-" pg:", fk:List"`
}

SubstanceAlcoholOrdered represents the payload for the substance alcholo ordered section.

func (*SubstanceAlcoholOrdered) ClearNoBranches

func (entity *SubstanceAlcoholOrdered) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceAlcoholOrdered) Marshal added in v0.5.3

func (entity *SubstanceAlcoholOrdered) Marshal() Payload

Marshal to payload structure

func (*SubstanceAlcoholOrdered) Unmarshal added in v0.5.3

func (entity *SubstanceAlcoholOrdered) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceAlcoholOrdered) Valid added in v0.5.3

func (entity *SubstanceAlcoholOrdered) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceAlcoholVoluntary added in v0.5.3

type SubstanceAlcoholVoluntary struct {
	PayloadSoughtTreatment Payload `json:"SoughtTreatment" sql:"-"`
	PayloadList            Payload `json:"List" sql:"-"`

	// Validator specific fields
	SoughtTreatment *Branch     `json:"-"`
	List            *Collection `json:"-"`

	// Persister specific fields
	ID                int `json:"-"`
	SoughtTreatmentID int `json:"-" pg:", fk:SoughtTreatment"`
	ListID            int `json:"-" pg:", fk:List"`
}

SubstanceAlcoholVoluntary represents the payload for the substance alcohol voluntary section.

func (*SubstanceAlcoholVoluntary) ClearNoBranches

func (entity *SubstanceAlcoholVoluntary) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceAlcoholVoluntary) Marshal added in v0.5.3

func (entity *SubstanceAlcoholVoluntary) Marshal() Payload

Marshal to payload structure

func (*SubstanceAlcoholVoluntary) Unmarshal added in v0.5.3

func (entity *SubstanceAlcoholVoluntary) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceAlcoholVoluntary) Valid added in v0.5.3

func (entity *SubstanceAlcoholVoluntary) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceDrugClearance added in v0.5.3

type SubstanceDrugClearance struct {
	PayloadUsedDrugs Payload `json:"UsedDrugs" sql:"-"`
	PayloadList      Payload `json:"List" sql:"-"`

	// Validator specific fields
	UsedDrugs *Branch     `json:"-"`
	List      *Collection `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	UsedDrugsID int `json:"-" pg:", fk:UsedDrugs"`
	ListID      int `json:"-" pg:", fk:List"`
}

SubstanceDrugClearance represents the payload for the substance drug clearance section.

func (*SubstanceDrugClearance) ClearNoBranches

func (entity *SubstanceDrugClearance) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceDrugClearance) Marshal added in v0.5.3

func (entity *SubstanceDrugClearance) Marshal() Payload

Marshal to payload structure

func (*SubstanceDrugClearance) Unmarshal added in v0.5.3

func (entity *SubstanceDrugClearance) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceDrugClearance) Valid added in v0.5.3

func (entity *SubstanceDrugClearance) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceDrugMisuse added in v0.5.3

type SubstanceDrugMisuse struct {
	PayloadUsedDrugs Payload `json:"MisusedDrugs" sql:"-"`
	PayloadList      Payload `json:"List" sql:"-"`

	// Validator specific fields
	UsedDrugs *Branch     `json:"-"`
	List      *Collection `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	UsedDrugsID int `json:"-" pg:", fk:MisusedDrugs"`
	ListID      int `json:"-" pg:", fk:List"`
}

SubstanceDrugMisuse represents the payload for the substance drug misuse section.

func (*SubstanceDrugMisuse) ClearNoBranches

func (entity *SubstanceDrugMisuse) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceDrugMisuse) Marshal added in v0.5.3

func (entity *SubstanceDrugMisuse) Marshal() Payload

Marshal to payload structure

func (*SubstanceDrugMisuse) Unmarshal added in v0.5.3

func (entity *SubstanceDrugMisuse) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceDrugMisuse) Valid added in v0.5.3

func (entity *SubstanceDrugMisuse) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceDrugOrdered added in v0.5.3

type SubstanceDrugOrdered struct {
	PayloadTreatmentOrdered Payload `json:"TreatmentOrdered" sql:"-"`
	PayloadList             Payload `json:"List" sql:"-"`

	// Validator specific fields
	TreatmentOrdered *Branch     `json:"-"`
	List             *Collection `json:"-"`

	// Persister specific fields
	ID         int `json:"-"`
	InvolvedID int `json:"-" pg:", fk:TreatmentOrdered"`
	ListID     int `json:"-" pg:", fk:List"`
}

SubstanceDrugOrdered represents the payload for the substance drug ordered section.

func (*SubstanceDrugOrdered) ClearNoBranches

func (entity *SubstanceDrugOrdered) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceDrugOrdered) Marshal added in v0.5.3

func (entity *SubstanceDrugOrdered) Marshal() Payload

Marshal to payload structure

func (*SubstanceDrugOrdered) Unmarshal added in v0.5.3

func (entity *SubstanceDrugOrdered) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceDrugOrdered) Valid added in v0.5.3

func (entity *SubstanceDrugOrdered) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceDrugPublicSafety added in v0.5.3

type SubstanceDrugPublicSafety struct {
	PayloadUsedDrugs Payload `json:"UsedDrugs" sql:"-"`
	PayloadList      Payload `json:"List" sql:"-"`

	// Validator specific fields
	UsedDrugs *Branch     `json:"-"`
	List      *Collection `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	UsedDrugsID int `json:"-" pg:", fk:UsedDrugs"`
	ListID      int `json:"-" pg:", fk:List"`
}

SubstanceDrugPublicSafety represents the payload for the substance drug public safety section.

func (*SubstanceDrugPublicSafety) ClearNoBranches

func (entity *SubstanceDrugPublicSafety) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceDrugPublicSafety) Marshal added in v0.5.3

func (entity *SubstanceDrugPublicSafety) Marshal() Payload

Marshal to payload structure

func (*SubstanceDrugPublicSafety) Unmarshal added in v0.5.3

func (entity *SubstanceDrugPublicSafety) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceDrugPublicSafety) Valid added in v0.5.3

func (entity *SubstanceDrugPublicSafety) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceDrugPurchase added in v0.5.3

type SubstanceDrugPurchase struct {
	PayloadInvolved Payload `json:"Involved" sql:"-"`
	PayloadList     Payload `json:"List" sql:"-"`

	// Validator specific fields
	Involved *Branch     `json:"-"`
	List     *Collection `json:"-"`

	// Persister specific fields
	ID         int `json:"-"`
	InvolvedID int `json:"-" pg:", fk:Involved"`
	ListID     int `json:"-" pg:", fk:List"`
}

SubstanceDrugPurchase represents the payload for the substance drug purchase section.

func (*SubstanceDrugPurchase) ClearNoBranches

func (entity *SubstanceDrugPurchase) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceDrugPurchase) Marshal added in v0.5.3

func (entity *SubstanceDrugPurchase) Marshal() Payload

Marshal to payload structure

func (*SubstanceDrugPurchase) Unmarshal added in v0.5.3

func (entity *SubstanceDrugPurchase) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceDrugPurchase) Valid added in v0.5.3

func (entity *SubstanceDrugPurchase) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceDrugUsage added in v0.5.3

type SubstanceDrugUsage struct {
	PayloadUsedDrugs Payload `json:"UsedDrugs" sql:"-"`
	PayloadList      Payload `json:"List" sql:"-"`

	// Validator specific fields
	UsedDrugs *Branch     `json:"-"`
	List      *Collection `json:"-"`

	// Persister specific fields
	ID          int `json:"-"`
	UsedDrugsID int `json:"-" pg:", fk:UsedDrugs"`
	ListID      int `json:"-" pg:", fk:List"`
}

SubstanceDrugUsage represents the payload for the substance drug usage section.

func (*SubstanceDrugUsage) ClearNoBranches

func (entity *SubstanceDrugUsage) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceDrugUsage) Marshal added in v0.5.3

func (entity *SubstanceDrugUsage) Marshal() Payload

Marshal to payload structure

func (*SubstanceDrugUsage) Unmarshal added in v0.5.3

func (entity *SubstanceDrugUsage) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceDrugUsage) Valid added in v0.5.3

func (entity *SubstanceDrugUsage) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type SubstanceDrugVoluntary added in v0.5.3

type SubstanceDrugVoluntary struct {
	PayloadTreatmentVoluntary Payload `json:"TreatmentVoluntary" sql:"-"`
	PayloadList               Payload `json:"List" sql:"-"`

	// Validator specific fields
	TreatmentVoluntary *Branch     `json:"-"`
	List               *Collection `json:"-"`

	// Persister specific fields
	ID         int `json:"-"`
	InvolvedID int `json:"-" pg:", fk:TreatmentVoluntary"`
	ListID     int `json:"-" pg:", fk:List"`
}

SubstanceDrugVoluntary represents the payload for the substance drug voluntary section.

func (*SubstanceDrugVoluntary) ClearNoBranches

func (entity *SubstanceDrugVoluntary) ClearNoBranches() error

ClearNoBranches clears the "no" answers on application rejection

func (*SubstanceDrugVoluntary) Marshal added in v0.5.3

func (entity *SubstanceDrugVoluntary) Marshal() Payload

Marshal to payload structure

func (*SubstanceDrugVoluntary) Unmarshal added in v0.5.3

func (entity *SubstanceDrugVoluntary) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*SubstanceDrugVoluntary) Valid added in v0.5.3

func (entity *SubstanceDrugVoluntary) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Supervisor added in v0.5.3

type Supervisor struct {
	PayloadSupervisorName     Payload `json:"SupervisorName" sql:"-"`
	PayloadTitle              Payload `json:"Title" sql:"-"`
	PayloadEmail              Payload `json:"Email" sql:"-"`
	PayloadEmailNotApplicable Payload `json:"EmailNotApplicable" sql:"-"`
	PayloadAddress            Payload `json:"Address" sql:"-"`
	PayloadTelephone          Payload `json:"Telephone" sql:"-"`

	// Validator specific fields
	SupervisorName     *Text          `json:"-"`
	Title              *Text          `json:"-"`
	Email              *Email         `json:"-"`
	EmailNotApplicable *NotApplicable `json:"-"`
	Address            *Location      `json:"-"`
	Telephone          *Telephone     `json:"-"`

	// Persister specific fields
	ID                   int `json:"-"`
	AccountID            int `json:"-"`
	SupervisorNameID     int `json:"-"`
	TitleID              int `json:"-"`
	EmailID              int `json:"-"`
	EmailNotApplicableID int `json:"-"`
	AddressID            int `json:"-"`
	TelephoneID          int `json:"-"`
}

Supervisor is a basic input.

func (*Supervisor) Marshal added in v0.5.3

func (entity *Supervisor) Marshal() Payload

Marshal to payload structure

func (*Supervisor) Unmarshal added in v0.5.3

func (entity *Supervisor) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Supervisor) Valid added in v0.5.3

func (entity *Supervisor) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Telephone added in v0.5.3

type Telephone struct {
	ID         int    `json:"-"`
	TimeOfDay  string `json:"timeOfDay"`
	Type       string `json:"type"`
	NumberType string `json:"numberType"`
	Number     string `json:"number"`
	Extension  string `json:"extension"`
	NoNumber   bool   `json:"noNumber"`
}

Telephone is a basic input.

func (*Telephone) Marshal added in v0.5.3

func (entity *Telephone) Marshal() Payload

Marshal to payload structure

func (*Telephone) Unmarshal added in v0.5.3

func (entity *Telephone) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Telephone) Valid added in v0.5.3

func (entity *Telephone) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Text added in v0.5.3

type Text struct {
	ID    int    `json:"-"`
	Value string `json:"value"`
}

Text is a basic input.

func (*Text) Marshal added in v0.5.3

func (entity *Text) Marshal() Payload

Marshal to payload structure

func (*Text) Unmarshal added in v0.5.3

func (entity *Text) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Text) Valid added in v0.5.3

func (entity *Text) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type Textarea added in v0.5.3

type Textarea struct {
	ID    int    `json:"-"`
	Value string `json:"value"`
}

Textarea is a basic input.

func (*Textarea) Marshal added in v0.5.3

func (entity *Textarea) Marshal() Payload

Marshal to payload structure

func (*Textarea) Unmarshal added in v0.5.3

func (entity *Textarea) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Textarea) Valid added in v0.5.3

func (entity *Textarea) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type TokenService added in v0.5.3

type TokenService interface {
	CheckToken(request *http.Request) (string, int, error)
	ExtractToken(request *http.Request) string
	CurrentAudience(request *http.Request) string
	SessionIndex(request *http.Request) string
	NewToken(id int, sessionIndex, audience string) (string, time.Time, error)
	Timeout() time.Duration
	Secret() []byte
	ConfigureEnvironment(size int) error
	TargetAudiences() []string
}

TokenService represents a service providing Javascript Web Tokens.

type Transmission added in v0.5.3

type Transmission struct {
	ID         int
	AccountID  int
	Raw        []byte
	RequestKey string
	AgencyKey  int
	Status     string
	Created    time.Time
	Modified   time.Time
}

Transmission record of application being sent to external system for additional processing.

func (*Transmission) Find added in v0.5.3

func (transmission *Transmission) Find(context DatabaseService) error

Find is not used for transmissions. Please use the `Get` method.

func (*Transmission) Get added in v0.5.3

func (transmission *Transmission) Get(context DatabaseService) error

Get transmission record from the database.

func (*Transmission) Save added in v0.5.3

func (transmission *Transmission) Save(context DatabaseService) error

Save transmission record to the database.

type Treatment added in v0.5.3

type Treatment struct {
	PayloadName    Payload `json:"Name" sql:"-"`
	PayloadPhone   Payload `json:"Phone" sql:"-"`
	PayloadAddress Payload `json:"Address" sql:"-"`

	// Validator specific fields
	Name    *Text      `json:"-"`
	Phone   *Telephone `json:"-"`
	Address *Location  `json:"-"`

	// Persister specific fields
	ID        int `json:"-"`
	NameID    int `json:"-" pg:", fk:Name"`
	PhoneID   int `json:"-" pg:", fk:Phone"`
	AddressID int `json:"-" pg:", fk:Address"`
}

Treatment is a basic structure.

func (*Treatment) Marshal added in v0.5.3

func (entity *Treatment) Marshal() Payload

Marshal to payload structure

func (*Treatment) Unmarshal added in v0.5.3

func (entity *Treatment) Unmarshal(raw []byte) error

Unmarshal bytes in to the entity properties.

func (*Treatment) Valid added in v0.5.3

func (entity *Treatment) Valid() (bool, error)

Valid checks the value(s) against an battery of tests.

type ValidationResult added in v0.5.3

type ValidationResult interface {
	Result(fieldname string) interface{}
}

ValidationResult is an interface to be used by errors that return a properly formatted struct to be used to send for client-side validation requests.

type Validator added in v0.5.3

type Validator interface {
	Valid() (bool, error)
}

Validator interface entities which allow validating properties.

type XMLService added in v0.5.3

type XMLService interface {
	PackageXML(app Application) (template.HTML, error)
}

XMLService represents a basic interface to XML related functionality.

Jump to

Keyboard shortcuts

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