response

package
v0.0.0-...-98895fe Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError

func NewError(ctx *gin.Context, status int, err error)

Types

type ApiTokenResponse

type ApiTokenResponse struct {
	UserID    string
	Name      string
	Token     string
	ExpiresAt int64
	CreatedAt int64
}

type CapabilitiesResponse

type CapabilitiesResponse struct {
	Dex struct {
		Enabled bool `json:"enabled"`
	} `json:"dex"`
}

type ErrEmptyProjectName

type ErrEmptyProjectName struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"Project name can't be empty"`
}

type ErrInvalidCredentials

type ErrInvalidCredentials struct {
	Code    int    `json:"code" example:"401"`
	Message string `json:"message" example:"Invalid Credentials"`
}

type ErrInvalidEmail

type ErrInvalidEmail struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"Email address is invalid"`
}

type ErrInvalidRequest

type ErrInvalidRequest struct {
	Code    int    `json:"code" example:"400"`
	Message string `` /* 169-byte string literal not displayed */
}

type ErrInvalidRole

type ErrInvalidRole struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"Role is invalid"`
}

type ErrProjectNotFound

type ErrProjectNotFound struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"This project does not exist"`
}

type ErrProjectNotFoundstruct

type ErrProjectNotFoundstruct struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"project does not exist"`
}

type ErrServerError

type ErrServerError struct {
	Code    int    `json:"code" example:"500"`
	Message string `` /* 131-byte string literal not displayed */
}

type ErrStrictPasswordPolicyViolation

type ErrStrictPasswordPolicyViolation struct {
	Code    int    `json:"code" example:"401"`
	Message string `` /* 156-byte string literal not displayed */
}

type ErrUnauthorized

type ErrUnauthorized struct {
	Code    int    `json:"code" example:"401"`
	Message string `json:"message" example:"The user does not have requested authorization to access this resource"`
}

type ErrUserDeactivated

type ErrUserDeactivated struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"your account has been deactivated"`
}

type ErrUserExists

type ErrUserExists struct {
	Code    int    `json:"code" example:"401"`
	Message string `json:"message" example:"This username is already assigned to another user"`
}

type ErrUserNotFound

type ErrUserNotFound struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"user does not exist"`
}

type HTTPError

type HTTPError struct {
	Code    int    `json:"code" example:"400"`
	Message string `json:"message" example:"status bad request"`
}

type LoginResponse

type LoginResponse struct {
	// contains filtered or unexported fields
}

type MessageResponse

type MessageResponse struct {
	Message string
}

type NewApiToken

type NewApiToken struct {
	// contains filtered or unexported fields
}

type Response

type Response struct {
	Response string
}

type Role

type Role string

type UserResponse

type UserResponse struct {
	ID            string `bson:"_id,omitempty" json:"userID"`
	Username      string `bson:"username,omitempty" json:"username"`
	Password      string `bson:"password,omitempty" json:"password,omitempty"`
	Email         string `bson:"email,omitempty" json:"email,omitempty"`
	Name          string `bson:"name,omitempty" json:"name,omitempty"`
	Role          Role   `bson:"role,omitempty" json:"role"`
	DeactivatedAt *int64 `bson:"deactivated_at,omitempty" json:"deactivatedAt,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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