entity

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Email     string `json:"email"`
	Jwt       string `json:"jwt"`
	SecretKey string `json:"secret_key"`
	Issuer    string `json:"issuer"`
	Expired   int64  `json:"expired"`
}

type CreateThreadRequest

type CreateThreadRequest struct {
	VisitID uuid.UUID `json:"visit_id"`
	UserID  uuid.UUID `json:"user_id"`
	Content string    `json:"content"`
}

type CreateUserRequest

type CreateUserRequest struct {
	FullName string `json:"full_name"`
	Email    string `json:"email"`
	Password string `json:"password"`
	IsAdmin  bool   `json:"is_admin"`
}

type CreateVisitRequest

type CreateVisitRequest struct {
	UserID uuid.UUID `json:"user_id"`
}

type Credentials

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

type ErrorMessage

type ErrorMessage struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Health

type Health struct {
	Status HealthComponent `json:"status"`
}

type HealthComponent

type HealthComponent struct {
	Server   string           `json:"server"`
	Database []HealthDatabase `json:"database"`
}

type HealthDatabase

type HealthDatabase struct {
	Name   string `json:"name"`
	Status string `json:"status"`
}

type JwtClaims

type JwtClaims struct {
	CredentialID string
	Expired      time.Duration
	Issuer       string
	SecretKey    []byte
}

type JwtRequest

type JwtRequest struct {
	Credential string
	Issuer     string `json:"issuer"`
}

type JwtResponse

type JwtResponse struct {
	Credential uuid.UUID `json:"credential"`
	Issuer     string    `json:"issuer"`
	Expired    int64     `json:"expired"`
	Jwt        string    `json:"jwt"`
}

type Thread

type Thread struct {
	ID        uuid.UUID `json:"id"`
	VisitID   uuid.UUID `json:"visit_id"`
	UserID    uuid.UUID `json:"user_id"`
	Content   string    `json:"content"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	DeletedAt time.Time `json:"deleted_at"`
}

type ThreadMultiResponse

type ThreadMultiResponse struct {
	Page      int64                       `json:"page"`
	Offset    int                         `json:"offset"`
	Limit     int                         `json:"limit"`
	TotalRows int64                       `json:"total_rows"`
	TotalPage int64                       `json:"total_page"`
	Filter    ThreadQueryFilter           `json:"filter"`
	Rows      []ThreadMultiResponsePerRow `json:"rows"`
}

type ThreadMultiResponsePerRow

type ThreadMultiResponsePerRow struct {
	ID        uuid.UUID          `json:"id"`
	User      UserSingleResponse `json:"user"`
	Content   string             `json:"content"`
	CreatedAt time.Time          `json:"created_at"`
	UpdatedAt time.Time          `json:"updated_at"`
	DeletedAt time.Time          `json:"deleted_at"`
}

type ThreadOrderBy

type ThreadOrderBy struct {
	Field string `json:"field"`
	Sort  string `json:"sort"`
}

type ThreadQueryFilter

type ThreadQueryFilter struct {
	VisitID uuid.UUID     `json:"visit_id"`
	OrderBy ThreadOrderBy `json:"order_by"`
}

type ThreadSingleResponse

type ThreadSingleResponse struct {
	ID        uuid.UUID           `json:"id"`
	Visit     VisitSingleResponse `json:"visit"`
	User      UserSingleResponse  `json:"user"`
	Content   string              `json:"content"`
	CreatedAt time.Time           `json:"created_at"`
	UpdatedAt time.Time           `json:"updated_at"`
	DeletedAt time.Time           `json:"deleted_at"`
}

type UpdateUserRequest

type UpdateUserRequest struct {
	FullName string `json:"full_name"`
	Email    string `json:"email"`
}

type User

type User struct {
	ID        uuid.UUID `json:"id"`
	FullName  string    `json:"full_name"`
	Email     string    `json:"email"`
	Password  string    `json:"password"`
	IsAdmin   bool      `json:"is_admin"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	DeletedAt time.Time `json:"deleted_at"`
}

type UserMatrix

type UserMatrix struct {
	Id        uuid.UUID
	Endpoint  string
	IsAdmin   bool
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt time.Time
}

type UserMatrixValidateRequest

type UserMatrixValidateRequest struct {
	UserID   uuid.UUID
	Endpoint string
	IsAdmin  bool
}

type UserMultiResponse

type UserMultiResponse struct {
	Page      int64                `json:"page"`
	Offset    int                  `json:"offset"`
	Limit     int                  `json:"limit"`
	TotalRows int64                `json:"total_rows"`
	TotalPage int64                `json:"total_page"`
	Filter    UserQueryFilter      `json:"filter"`
	Rows      []UserSingleResponse `json:"rows"`
}

type UserOrderBy

type UserOrderBy struct {
	Field string `json:"field"`
	Sort  string `json:"sort"`
}

type UserQueryFilter

type UserQueryFilter struct {
	Key     string      `json:"key"`
	IsAdmin string      `json:"is_admin"`
	OrderBy UserOrderBy `json:"order_by"`
}

type UserSingleResponse

type UserSingleResponse struct {
	ID        uuid.UUID `json:"id"`
	FullName  string    `json:"full_name"`
	Email     string    `json:"email"`
	IsAdmin   bool      `json:"is_admin"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	DeletedAt time.Time `json:"deleted_at"`
}

type Visit

type Visit struct {
	ID        uuid.UUID `json:"id"`
	UserID    uuid.UUID `json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	DeletedAt time.Time `json:"deleted_at"`
}

type VisitMultiResponse

type VisitMultiResponse struct {
	Page      int64                 `json:"page"`
	Offset    int                   `json:"offset"`
	Limit     int                   `json:"limit"`
	TotalRows int64                 `json:"total_rows"`
	TotalPage int64                 `json:"total_page"`
	Filter    VisitQueryFilter      `json:"filter"`
	Rows      []VisitSingleResponse `json:"rows"`
}

type VisitOrderBy

type VisitOrderBy struct {
	Field string `json:"field"`
	Sort  string `json:"sort"`
}

type VisitQueryFilter

type VisitQueryFilter struct {
	OrderBy VisitOrderBy `json:"order_by"`
}

type VisitSingleResponse

type VisitSingleResponse struct {
	ID        uuid.UUID          `json:"id"`
	User      UserSingleResponse `json:"user"`
	CreatedAt time.Time          `json:"created_at"`
	UpdatedAt time.Time          `json:"updated_at"`
	DeletedAt time.Time          `json:"deleted_at"`
}

Jump to

Keyboard shortcuts

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