model

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthReq

type AuthReq struct {
	Nickname string `json:"nickname"`
	Password string `json:"password"`
}

type AuthRsp

type AuthRsp struct {
	UserID int64  `json:"user_id"`
	Token  string `json:"token"`
}

type CreateSecretReq added in v0.5.0

type CreateSecretReq struct {
	Describe string `json:"describe"`
	Domain   int    `json:"domain"`
	Key      string `json:"key"`
}

type CreateSecretRsp added in v0.5.0

type CreateSecretRsp struct {
	SecretID int64 `json:"secret_id"`
}

type CreateTaskReq added in v0.5.0

type CreateTaskReq struct {
	Describe string          `json:"describe"`
	Kind     string          `json:"kind"`
	Spec     string          `json:"spec"`
	Param    json.RawMessage `json:"param"`
}

type CreateTaskRsp added in v0.5.0

type CreateTaskRsp struct {
	TaskID int64 `json:"task_id"`
}

type CreateUserReq

type CreateUserReq struct {
	Nickname string `json:"nickname"`
	Password string `json:"password"`
	Mail     string `json:"mail"`
	Telegram int64  `json:"telegram"`
}

type CreateUserRsp

type CreateUserRsp struct {
	UserID int64  `json:"user_id"`
	Token  string `json:"token"`
}

type DeleteSecretReq added in v0.5.0

type DeleteSecretReq struct {
	SecretID int64 `json:"secret_id"`
}

type DeleteTaskReq added in v0.5.0

type DeleteTaskReq struct {
	TaskID int64 `json:"task_id"`
}

type GetSecretsReq added in v0.5.0

type GetSecretsReq struct {
	SecretIDs []int64 `json:"secret_ids"`
	Domains   []int   `json:"domains"`
}

type GetSecretsRsp added in v0.5.0

type GetSecretsRsp struct {
	List []*Secret `json:"list"`
}

type GetTasksReq added in v0.5.0

type GetTasksReq struct {
	TaskID    int64  `json:"task_id"`
	Desc      string `json:"desc"`
	Kind      string `json:"kind"`
	Spec      string `json:"spec"`
	CreatedAt int64  `json:"created_at"`
	PageID    int64  `json:"page_id"`
	PageSize  int64  `json:"page_size"`
}

type GetTasksRsp added in v0.5.0

type GetTasksRsp struct {
	Count int64   `json:"count"`
	List  []*Task `json:"tasks"`
}

type Request

type Request struct {
	Token string      `json:"token"`
	Data  interface{} `json:"data"`
}

type Response

type Response struct {
	Code        int         `json:"code"`
	Description string      `json:"description"`
	Data        interface{} `json:"data"`
}

func (*Response) String

func (rsp *Response) String() string

type Secret added in v0.5.0

type Secret struct {
	SecretID int64  `json:"secret_id"`
	Describe string `json:"describe"`
	Domain   int    `json:"domain"`
	Key      string `json:"key"`
}

type Task added in v0.5.0

type Task struct {
	TaskID   int64  `json:"task_id"`
	Describe string `json:"describe"`
	Kind     int    `json:"kind"`
	Spec     string `json:"spec"`
	Param    string `json:"param"`
}

type UpdateTaskReq added in v0.7.0

type UpdateTaskReq struct {
	TaskID int64           `json:"task_id"`
	Desc   string          `json:"desc"`
	Spec   string          `json:"spec"`
	Param  json.RawMessage `json:"param"`
}

type UpdateUserReq added in v0.7.0

type UpdateUserReq struct {
	Nickname string `json:"nickname"`
	Password string `json:"password"`
	Mail     string `json:"mail"`
	Telegram int64  `json:"telegram"`
}

Jump to

Keyboard shortcuts

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