views

package
v0.0.0-...-5f4f256 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AuthStatusMediaMap is a map of attribute names in result type
	// AuthStatusMedia indexed by view name.
	AuthStatusMediaMap = map[string][]string{
		"default": []string{
			"google",
			"facebook",
			"twitter",
			"linkedin",
			"microsoft",
			"standard",
		},
	}
	// UserMediaMap is a map of attribute names in result type UserMedia indexed by
	// view name.
	UserMediaMap = map[string][]string{
		"default": []string{
			"id",
			"phone",
			"lastName",
			"uid",
			"updatedAt",
			"email",
			"category",
			"isActive",
			"aggCampaigns",
			"genres",
			"username",
			"gender",
			"onboarded",
			"location",
			"dob",
			"createdAt",
			"aggSocial",
			"firstName",
			"socialMediaRawData",
			"changingEmail",
			"isAdmin",
			"isBrandManager",
			"verifiedEmail",
			"Authorization",
			"X-Session",
		},
	}
	// AggCampaignMediaMap is a map of attribute names in result type
	// AggCampaignMedia indexed by view name.
	AggCampaignMediaMap = map[string][]string{
		"default": []string{
			"rejected",
			"invited",
			"applied",
			"shortlisted",
			"selected",
			"previous",
		},
	}
	// UserOnboardedMediaMap is a map of attribute names in result type
	// UserOnboardedMedia indexed by view name.
	UserOnboardedMediaMap = map[string][]string{
		"default": []string{
			"profile",
			"signup",
			"store",
			"campaignDetails",
		},
	}
	// UserLocationMediaMap is a map of attribute names in result type
	// UserLocationMedia indexed by view name.
	UserLocationMediaMap = map[string][]string{
		"default": []string{
			"street",
			"line2",
			"locality",
			"city",
			"state",
			"country",
			"postcode",
			"text",
		},
	}
	// AggSocialMediaMap is a map of attribute names in result type AggSocialMedia
	// indexed by view name.
	AggSocialMediaMap = map[string][]string{
		"default": []string{
			"instagram",
		},
	}
	// AggInstagramMediaMap is a map of attribute names in result type
	// AggInstagramMedia indexed by view name.
	AggInstagramMediaMap = map[string][]string{
		"default": []string{
			"website",
			"selectedPlan",
			"username",
			"profilePicture",
			"bio",
			"id",
			"isBusiness",
			"fullName",
		},
	}
	// SelectedPlanMediaMap is a map of attribute names in result type
	// SelectedPlanMedia indexed by view name.
	SelectedPlanMediaMap = map[string][]string{
		"default": []string{
			"ID",
			"title",
			"description",
			"CPC",
			"Commission",
			"OneP",
			"TwoP",
			"OneV",
			"TwoV",
			"OnePOneV",
		},
	}
)

Functions

func ValidateAggCampaignMediaView

func ValidateAggCampaignMediaView(result *AggCampaignMediaView) (err error)

ValidateAggCampaignMediaView runs the validations defined on AggCampaignMediaView using the "default" view.

func ValidateAggInstagramMediaView

func ValidateAggInstagramMediaView(result *AggInstagramMediaView) (err error)

ValidateAggInstagramMediaView runs the validations defined on AggInstagramMediaView using the "default" view.

func ValidateAggSocialMediaView

func ValidateAggSocialMediaView(result *AggSocialMediaView) (err error)

ValidateAggSocialMediaView runs the validations defined on AggSocialMediaView using the "default" view.

func ValidateAuthStatusMedia

func ValidateAuthStatusMedia(result *AuthStatusMedia) (err error)

ValidateAuthStatusMedia runs the validations defined on the viewed result type AuthStatusMedia.

func ValidateAuthStatusMediaView

func ValidateAuthStatusMediaView(result *AuthStatusMediaView) (err error)

ValidateAuthStatusMediaView runs the validations defined on AuthStatusMediaView using the "default" view.

func ValidateSelectedPlanMediaView

func ValidateSelectedPlanMediaView(result *SelectedPlanMediaView) (err error)

ValidateSelectedPlanMediaView runs the validations defined on SelectedPlanMediaView using the "default" view.

func ValidateUserLocationMediaView

func ValidateUserLocationMediaView(result *UserLocationMediaView) (err error)

ValidateUserLocationMediaView runs the validations defined on UserLocationMediaView using the "default" view.

func ValidateUserMedia

func ValidateUserMedia(result *UserMedia) (err error)

ValidateUserMedia runs the validations defined on the viewed result type UserMedia.

func ValidateUserMediaView

func ValidateUserMediaView(result *UserMediaView) (err error)

ValidateUserMediaView runs the validations defined on UserMediaView using the "default" view.

func ValidateUserOnboardedMediaView

func ValidateUserOnboardedMediaView(result *UserOnboardedMediaView) (err error)

ValidateUserOnboardedMediaView runs the validations defined on UserOnboardedMediaView using the "default" view.

Types

type AggCampaignMediaView

type AggCampaignMediaView struct {
	Rejected    []interface{}
	Invited     []interface{}
	Applied     []interface{}
	Shortlisted []interface{}
	Selected    []interface{}
	Previous    []interface{}
}

AggCampaignMediaView is a type that runs validations on a projected type.

type AggInstagramMediaView

type AggInstagramMediaView struct {
	Website        *string
	SelectedPlan   *SelectedPlanMediaView
	Username       *string
	ProfilePicture *string
	Bio            *string
	ID             *string
	IsBusiness     *bool
	FullName       *string
}

AggInstagramMediaView is a type that runs validations on a projected type.

type AggSocialMediaView

type AggSocialMediaView struct {
	Instagram *AggInstagramMediaView
}

AggSocialMediaView is a type that runs validations on a projected type.

type AuthStatusMedia

type AuthStatusMedia struct {
	// Type to project
	Projected *AuthStatusMediaView
	// View to render
	View string
}

AuthStatusMedia is the viewed result type that is projected based on a view.

type AuthStatusMediaView

type AuthStatusMediaView struct {
	// True if user has google Oauth signin
	Google *bool
	// True if user has facebook Oauth signin
	Facebook *bool
	// True if user has twitter Oauth signin
	Twitter *bool
	// True if user has linkedin Oauth signin
	Linkedin *bool
	// True if user has microsoft Oauth signin
	Microsoft *bool
	// True if user has password signin
	Standard *bool
}

AuthStatusMediaView is a type that runs validations on a projected type.

type SelectedPlanMediaView

type SelectedPlanMediaView struct {
	ID          *string `json:"id"`
	Title       *string `json:"title"`
	Description *string `json:"description"`
	CPC         *int    `json:"CPC"`
	Commission  *int    `json:"commission"`
	OneP        *int    `json:"1P"`
	TwoP        *int    `json:"2P"`
	OneV        *int    `json:"1V"`
	TwoV        *int    `json:"2V"`
	OnePOneV    *int    `json:"1P + 1V"`
}

SelectedPlanMediaView is a type that runs validations on a projected type.

type UserLocationMediaView

type UserLocationMediaView struct {
	Street   *string
	Line2    *string
	Locality *string
	City     *string
	State    *string
	Country  *string
	Postcode *string
	Text     *string
}

UserLocationMediaView is a type that runs validations on a projected type.

type UserMedia

type UserMedia struct {
	// Type to project
	Projected *UserMediaView
	// View to render
	View string
}

UserMedia is the viewed result type that is projected based on a view.

type UserMediaView

type UserMediaView struct {
	// Unique unchanging user ID
	ID *string
	// Given name for the user
	FirstName *string
	// Family name for the user
	LastName *string
	// Email attached to the account of the user
	Email *string
	// Phone Number Of the user
	Phone *string
	// Category of the user generated by our algorithms
	Category *string
	// Phone Number Of the user
	Username *string
	// When the user attempts to change their email, this is what they will change
	// it to after they verify that it belongs to them
	ChangingEmail *string
	Genres        []string
	// Whether the user has verified their email
	VerifiedEmail *bool
	// Whether the user is an administrator on the site
	IsAdmin *bool
	// Whether the user is a brand manager on the site
	IsBrandManager     *bool
	UID                *string
	UpdatedAt          *string
	IsActive           *bool
	AggCampaigns       *AggCampaignMediaView
	Gender             *string
	Onboarded          *UserOnboardedMediaView
	Location           *UserLocationMediaView
	Dob                *string
	CreatedAt          *string
	AggSocial          *AggSocialMediaView
	SocialMediaRawData interface{}
	Authorization      *string
	XSession           *string
}

UserMediaView is a type that runs validations on a projected type.

type UserOnboardedMediaView

type UserOnboardedMediaView struct {
	Profile         *bool
	Signup          *bool
	Store           *bool
	CampaignDetails *bool
}

UserOnboardedMediaView is a type that runs validations on a projected type.

Jump to

Keyboard shortcuts

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