dto

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationData

type AuthorizationData struct {
	Token        string                 `json:"token"`
	Role         authEnums.HorusecRoles `json:"role"`
	CompanyID    uuid.UUID              `json:"companyID"`
	RepositoryID uuid.UUID              `json:"repositoryID"`
}

func (*AuthorizationData) ToBytes

func (a *AuthorizationData) ToBytes() []byte

func (*AuthorizationData) Validate

func (a *AuthorizationData) Validate() error

type CreateAccount

type CreateAccount struct {
	Email    string `json:"email"`
	Password string `json:"password"`
	Username string `json:"username"`
}

func (*CreateAccount) ToAccount

func (c *CreateAccount) ToAccount() *authEntities.Account

type CreateAccountFromKeycloakResponse

type CreateAccountFromKeycloakResponse struct {
	AccountID          uuid.UUID `json:"accountID"`
	Username           string    `json:"username"`
	Email              string    `json:"email"`
	IsApplicationAdmin bool      `json:"isApplicationAdmin"`
}

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Otp      string `json:"otp"`
}

func (*Credentials) ToBytes

func (c *Credentials) ToBytes() []byte

func (*Credentials) Validate

func (c *Credentials) Validate() error

type EmailData

type EmailData struct {
	Email string `json:"email"`
}

type KeycloakToken

type KeycloakToken struct {
	AccessToken string `json:"accessToken"`
}

func (*KeycloakToken) ToBytes

func (l *KeycloakToken) ToBytes() []byte

func (*KeycloakToken) Validate

func (l *KeycloakToken) Validate() error

type LdapAuthResponse

type LdapAuthResponse struct {
	AccessToken        string    `json:"accessToken"`
	ExpiresAt          time.Time `json:"expiresAt"`
	Username           string    `json:"username"`
	Email              string    `json:"email"`
	IsApplicationAdmin bool      `json:"isApplicationAdmin"`
}

type LoginData

type LoginData struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

func (*LoginData) IsInvalid

func (l *LoginData) IsInvalid(email, passwordHash string) bool

func (*LoginData) ToBytes

func (l *LoginData) ToBytes() []byte

func (*LoginData) Validate

func (l *LoginData) Validate() error

type LoginResponse

type LoginResponse struct {
	AccessToken        string    `json:"accessToken"`
	RefreshToken       string    `json:"refreshToken"`
	Username           string    `json:"username"`
	Email              string    `json:"email"`
	ExpiresAt          time.Time `json:"expiresAt"`
	IsApplicationAdmin bool      `json:"isApplicationAdmin"`
}

type ResetCodeData

type ResetCodeData struct {
	Email string `json:"email"`
	Code  string `json:"code"`
}

func (*ResetCodeData) Validate

func (r *ResetCodeData) Validate() error

type UpdateAccount

type UpdateAccount struct {
	Email    string `json:"email"`
	Username string `json:"username"`
}

func (*UpdateAccount) ToAccount

func (c *UpdateAccount) ToAccount() *authEntities.Account

type ValidateUnique

type ValidateUnique struct {
	Email    string `json:"email"`
	Username string `json:"username"`
}

func (*ValidateUnique) Validate

func (v *ValidateUnique) Validate() error

Jump to

Keyboard shortcuts

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