idos

package
v0.0.0-...-01f85aa Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateApplicationCreateFromRequest

func ValidateApplicationCreateFromRequest(dirtyData *ApplicationCreateRequestIDO) (bool, string)

func ValidateApplicationUpdateFromRequest

func ValidateApplicationUpdateFromRequest(dirtyData *ApplicationUpdateRequestIDO) (bool, string)

Types

type ApplicationCreateRequestIDO

type ApplicationCreateRequestIDO struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	WebsiteURL  string `json:"website_url"`
	Scope       string `json:"scope"`
	RedirectURL string `json:"redirect_url"`
	ImageURL    string `json:"image_url"`
}

func (*ApplicationCreateRequestIDO) Unmarshal

type ApplicationLiteFilterIDO

type ApplicationLiteFilterIDO struct {
	TenantID  uint64      `json:"tenant_id"`
	States    []int8      `json:"states"`
	SortOrder null.String `json:"sort_order"`
	SortField null.String `json:"sort_field"`
	Search    null.String `json:"search"`
	Offset    uint64      `json:"last_seen_id"`
	Limit     uint64      `json:"limit"`
}

type ApplicationLiteListResponseIDO

type ApplicationLiteListResponseIDO struct {
	NextID  uint64                    `json:"next_id,omitempty"`
	Count   uint64                    `json:"count"`
	Results []*models.ApplicationLite `json:"results"`
}

func NewApplicationLiteListResponseIDO

func NewApplicationLiteListResponseIDO(arr []*models.ApplicationLite, count uint64) *ApplicationLiteListResponseIDO

type ApplicationResponseIDO

type ApplicationResponseIDO struct {
	ID           uint64    `json:"id"`
	UUID         string    `json:"uuid"`
	TenantID     uint64    `json:"tenant_id"`
	Name         string    `json:"name"`
	Description  string    `json:"description"`
	WebsiteURL   string    `json:"website_url"`
	Scope        string    `json:"scope"`
	RedirectURL  string    `json:"redirect_url"`
	ImageURL     string    `json:"image_url"`
	State        int8      `json:"state"`
	ClientID     string    `json:"client_id"`
	ClientSecret string    `json:"client_secret,omitempty"`
	CreatedTime  time.Time `json:"created_time"`
	// CreatedFromIP  string    `json:"created_from_ip"`
	ModifiedTime time.Time `json:"modified_time"`
}

func ApplicationResponseMarshal

func ApplicationResponseMarshal(m *models.Application) *ApplicationResponseIDO

type ApplicationUpdateRequestIDO

type ApplicationUpdateRequestIDO struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	WebsiteURL  string `json:"website_url"`
	Scope       string `json:"scope"`
	RedirectURL string `json:"redirect_url"`
	ImageURL    string `json:"image_url"`
}

func (*ApplicationUpdateRequestIDO) Unmarshal

func (ido *ApplicationUpdateRequestIDO) Unmarshal(r *http.Request) error

type DashboardResponseIDO

type DashboardResponseIDO struct {
}

type GreetingRequestIDO

type GreetingRequestIDO struct {
	Name string `json:"name"`
}

type GreetingResponseIDO

type GreetingResponseIDO struct {
	Message string `json:"message"`
}

type LoginRequestIDO

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

LoginRequest struct used to represent the user's `login` POST request data.

type LoginResponseIDO

type LoginResponseIDO struct {
	TenantID         uint64 `json:"tenant_id"`
	TenantSchemaName string `json:"tenant_schema_name"`
	FirstName        string `json:"first_name"`
	LastName         string `json:"last_name"`
	Email            string `json:"email"`
	RoleID           int8   `json:"role_id"`
	Language         string `json:"language"`

	// https://pkg.go.dev/golang.org/x/oauth2#Token
	AccessToken  string    `json:"access_token"`
	TokenType    string    `json:"token_type,omitempty"`
	RefreshToken string    `json:"refresh_token"`
	Expiry       time.Time `json:"expiry,omitempty"`
}

The struct used to represent the system's response when the `login` POST request was a success.

type RefreshTokenRequestIDO

type RefreshTokenRequestIDO struct {
	GrantType    string `json:"grant_type"`
	RefreshToken string `json:"refresh_token"`
}

The struct used to represent the user's `refresh token` POST request data.

type RefreshTokenResponseIDO

type RefreshTokenResponseIDO struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

The struct used to represent the system's response when the `refresh token` POST request was a success.

type RegisterRequestIDO

type RegisterRequestIDO struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
	Password  string `json:"password"`
	Language  string `json:"language"`
}

The struct used to represent the user's `register` POST request data.

type RegisterResponseIDO

type RegisterResponseIDO struct {
	Message string `json:"message"`
}

The struct used to represent the system's response when the `register` POST request was a success.

type TenantIDO

type TenantIDO struct {
	ID           uint64    `json:"id"`
	UUID         string    `json:"uuid"`
	Name         string    `json:"name"`
	State        int8      `json:"state"`
	Timezone     string    `json:"timestamp"`
	Language     string    `json:"language"`
	CreatedTime  time.Time `json:"created_time"`
	ModifiedTime time.Time `json:"modified_time"`
}

func NewTenantIDO

func NewTenantIDO(m *models.Tenant) *TenantIDO

type TenantUpdateRequestIDO

type TenantUpdateRequestIDO struct {
	Name string `json:"name"`
}

type UserIDO

type UserIDO struct {
	ID                uint64    `json:"id,omitempty"`
	UUID              string    `json:"uuid,omitempty"`
	TenantID          uint64    `json:"tenant_id,omitempty"`
	Email             string    `json:"email,omitempty"`
	FirstName         string    `json:"first_name,omitempty"`
	LastName          string    `json:"last_name,omitempty"`
	Name              string    `json:"name,omitempty"`
	LexicalName       string    `json:"lexical_name,omitempty"`
	PasswordAlgorithm string    `json:"password_algorithm,omitempty"`
	PasswordHash      string    `json:"password_hash,omitempty"`
	State             int8      `json:"state,omitempty"`
	RoleID            int8      `json:"role_id,omitempty"`
	Timezone          string    `json:"timezone,omitempty"`
	Language          string    `json:"language"`
	CreatedTime       time.Time `json:"created_time,omitempty"`
	ModifiedTime      time.Time `json:"modified_time,omitempty"`
	JoinedTime        time.Time `json:"joined_time,omitempty"`
	Salt              string    `json:"salt,omitempty"`
	WasEmailActivated bool      `json:"was_email_activated,omitempty"`
	PrAccessCode      string    `json:"pr_access_code,omitempty"`
	PrExpiryTime      time.Time `json:"pr_expiry_time,omitempty"`
	AccessToken       string    `json:"access_token,omitempty"`
	RefreshToken      string    `json:"refresh_token,omitempty"`
}

func NewUserIDO

func NewUserIDO(m *models.User) *UserIDO

type UserUpdateRequestIDO

type UserUpdateRequestIDO struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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