models

package
v1.0.3-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts struct {
	Accounts map[string]string `json:"accounts,omitempty"`
}

Accounts -- list of bound accounts

swagger:model

type BoundAccountDeleteRequest

type BoundAccountDeleteRequest struct {
	// required: true
	Resource string `json:"resource"`
}

BoundAccountDeleteRequest -- request to remove bound account

swagger:model

type BoundAccounts

type BoundAccounts map[string]string

BoundAccounts -- bound accounts list for user

swagger:model

type Domain

type Domain struct {
	// required: true
	Domain    string    `json:"domain"`
	AddedBy   string    `json:"added_by,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
}

DomainListResponse -- domains list

swagger:model

type DomainListResponse

type DomainListResponse struct {
	DomainList []Domain `json:"domain_list,omitempty"`
}

DomainListResponse -- domains list

swagger:model

type IDList

type IDList []string

IDList -- ids list

swagger:model

type Link struct {
	// required: true
	Link      string    `json:"link,omitempty"`
	Type      LinkType  `json:"type,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	ExpiredAt time.Time `json:"expired_at,omitempty"`
	IsActive  bool      `json:"is_active,omitempty"`
	SentAt    time.Time `json:"sent_at,omitempty"`
}

Link -- link (for registration/activation/etc)

swagger:model

type LinkType

type LinkType string

LinkType -- link type

swagger:model

const (
	LinkTypeConfirm   LinkType = "confirm"
	LinkTypePwdChange LinkType = "pwd_change"
	LinkTypeDelete    LinkType = "delete"
)
type Links struct {
	Links []Link `json:"links,omitempty"`
}

Links -- links list

swagger:model

type LoginID

type LoginID map[string]string

LoginID -- logins and user ID

swagger:model

type LoginRequest

type LoginRequest struct {
	// required: true
	Login string `json:"login"`
	// required: true
	Password string `json:"password"`
}

LoginRequest -- login request (for basic login)

swagger:model

type OAuthLoginRequest

type OAuthLoginRequest struct {
	// required: true
	Resource OAuthResource `json:"resource"`
	// required: true
	AccessToken string `json:"access_token"`
}

LoginRequest -- login request (for oauth login)

swagger:model

type OAuthResource

type OAuthResource string
const (
	GitHubOAuth   OAuthResource = "github"
	GoogleOAuth   OAuthResource = "google"
	FacebookOAuth OAuthResource = "facebook"
)

type OneTimeTokenLoginRequest

type OneTimeTokenLoginRequest struct {
	// required: true
	Token string `json:"token"`
}

LoginRequest -- login request (for token login)

swagger:model

type PasswordChangeRequest

type PasswordChangeRequest struct {
	// required: true
	CurrentPassword string `json:"current_password"`
	// required: true
	NewPassword string `json:"new_password"`
}

PasswordChangeRequest -- password change request

swagger:model

type PasswordRestoreRequest

type PasswordRestoreRequest struct {
	// required: true
	Link string `json:"link"`
	// required: true
	NewPassword string `json:"new_password"`
}

PasswordRestoreRequest -- password restore request

swagger:model

type Profile

type Profile struct {
	Referral      string   `json:"referral,omitempty"`
	Access        string   `json:"access,omitempty"`
	CreatedAt     string   `json:"created_at,omitempty"`
	DeletedAt     string   `json:"deleted_at,omitempty"`
	BlacklistedAt string   `json:"blacklisted_at,omitempty"`
	LastLogin     string   `json:"last_login,omitempty"`
	Data          UserData `json:"data,omitempty"`
}

Profile -- additional user information

swagger:model

type RegisterRequest

type RegisterRequest struct {
	// required: true
	Login string `json:"login"`
	// required: true
	Password string `json:"password"`
	// required: true
	ReCaptcha string `json:"recaptcha"`
	Referral  string `json:"referral"`
}

RegisterRequest -- request to create new user

swagger:model

type User

type User struct {
	// swagger: allOf
	*UserLogin
	// swagger: allOf
	*Accounts
	// swagger: allOf
	*Profile
	Role          string `json:"role,omitempty"`
	IsActive      bool   `json:"is_active,omitempty"`
	IsInBlacklist bool   `json:"is_in_blacklist,omitempty"`
	IsDeleted     bool   `json:"is_deleted,omitempty"`
}

User -- user model

swagger:model

type UserData

type UserData map[string]interface{}

UserData -- user profile data

swagger:model

type UserList

type UserList struct {
	Users []User `json:"users,omitempty"`
}

UserList -- users list

swagger:model

type UserLogin

type UserLogin struct {
	ID       string `json:"id,omitempty"`
	Login    string `json:"login,omitempty"`
	Password string `json:"password,omitempty"`
}

UserList -- model for user login, password and id

swagger:model

Jump to

Keyboard shortcuts

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