models

package
v0.0.0-...-530d549 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 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 CreateUserRequest

type CreateUserRequest struct {
	Name  string `json:"name,omitempty"`
	ReqId string `json:"req_id,omitempty"`
}

type CreateUserResponse

type CreateUserResponse struct {
	Code    uint32 `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		ReqId string `json:"req_id,omitempty"`
		Name  string `json:"name,omitempty"`
		Id    int64  `json:"id,omitempty"`
	} `json:"data,omitempty"`
}

type Message

type Message struct {
	Action     string                 `json:"action,omitempty"`
	MessageId  string                 `json:"message_id,omitempty"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
	Data       []byte                 `json:"data,omitempty"`
}

type User

type User struct {
	Id        int64      `gorm:"primaryKey, column:id" json:"id,omitempty"`
	Name      string     `gorm:"column:name" json:"name,omitempty"`
	ReqId     string     `gorm:"column:req_id" json:"req_id,omitempty"`
	RetryTime int        `gorm:"column:retry_time" json:"retry_time,omitempty"`
	Status    UserStatus `gorm:"column:status" json:"status,omitempty"`
	CreatedAt *time.Time `gorm:"column:created_at" json:"created_at,omitempty"`
	UpdatedAt *time.Time `gorm:"column:updated_at" json:"updated_at,omitempty"`
}

func (User) TabaleName

func (User) TabaleName() string

type UserCtx

type UserCtx struct {
	UserId         string `json:"user_id,omitempty"`
	TsEnroll       int64  `json:"ts_enroll,omitempty"`
	TsInActivePool int64  `json:"ts_in_active_pool,omitempty"`
}

type UserStatus

type UserStatus int8
const (
	// USER_INIT when start pipeline
	USER_INIT UserStatus = iota + 1

	// USER_SUCCESS when pipeline success
	USER_SUCCESS

	// USER_FAIL when pipeline fail
	USER_FAIL

	// USER_MUST_CLEAN wait a long time but can't get response from third party,
	// response error to client and need make cron job job remove from third party
	// after clean will change to USER_FAIL
	USER_MUST_CLEAN
)

Jump to

Keyboard shortcuts

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