controllers

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package kit collect the basic tool for developer to develop a bk-plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BKUser

type BKUser struct {
	Username string
	Token    string
}

type BaseResponse

type BaseResponse struct {
	Result  bool   `json:"result"`
	Message string `json:"message"`
}

type DebugPannelController

type DebugPannelController struct {
	beego.Controller
}

func (*DebugPannelController) Get

func (c *DebugPannelController) Get()

type DetailController

type DetailController struct {
	web.Controller
}

func (*DetailController) Get

func (c *DetailController) Get()

type DetailGetData

type DetailGetData struct {
	Version       string                 `json:"version"`
	Desc          string                 `json:"desc"`
	Inputs        map[string]interface{} `json:"inputs"`
	ContextInputs map[string]interface{} `json:"context_inputs"`
	Outputs       map[string]interface{} `json:"outputs"`
	Forms         map[string]interface{} `json:"forms"`
}

type DetailGetResponse

type DetailGetResponse struct {
	*BaseResponse
	Data *DetailGetData `json:"data"`
}

type InvokeController

type InvokeController struct {
	web.Controller
}

func (*InvokeController) Post

func (c *InvokeController) Post()

type InvokePostData

type InvokePostData struct {
	Outputs interface{}     `json:"outputs"`
	State   constants.State `json:"state"`
	Err     string          `json:"err"`
}

type InvokePostParam

type InvokePostParam struct {
	Inputs  json.RawMessage `json:"inputs"`
	Context json.RawMessage `json:"context"`
}

type InvokePostResponse

type InvokePostResponse struct {
	*BaseResponse
	TraceID string          `json:"trace_id"`
	Data    *InvokePostData `json:"data"`
}

type LogGetData

type LogGetData struct {
	Log string `json:"log"`
}

type LogsController

type LogsController struct {
	beego.Controller
}

func (*LogsController) Get

func (c *LogsController) Get()

type LogsGetResponse

type LogsGetResponse struct {
	*BaseResponse
	Data *LogGetData `json:"data"`
}

type MetaController

type MetaController struct {
	web.Controller
}

func (*MetaController) Get

func (c *MetaController) Get()

type MetaGetData

type MetaGetData struct {
	Code             string   `json:"code"`
	Description      string   `json:"description"`
	Versions         []string `json:"versions"`
	Language         string   `json:"language"`
	FrameworkVersion string   `json:"framework_version"`
	RuntimeVersion   string   `json:"runtime_version"`
}

type MetaGetResponse

type MetaGetResponse struct {
	*BaseResponse
	Data *MetaGetData `json:"data"`
}

type PluginApiBaseResponse

type PluginApiBaseResponse struct {
	Result  bool   `json:"result"`
	Message string `json:"message"`
}

type PluginApiController

type PluginApiController struct {
	beego.Controller
	User BKUser
}

func (*PluginApiController) GetBkapiAuthorizationInfo

func (p *PluginApiController) GetBkapiAuthorizationInfo() string

func (*PluginApiController) Prepare

func (p *PluginApiController) Prepare()

type PluginApiDispatchController added in v0.6.0

type PluginApiDispatchController struct {
	PluginApiController
}

func (*PluginApiDispatchController) FindController added in v0.6.0

func (c *PluginApiDispatchController) FindController(path string, method string) (string, bool)

func (*PluginApiDispatchController) Post added in v0.6.0

func (c *PluginApiDispatchController) Post()

type PluginApiDispatchParam added in v0.6.0

type PluginApiDispatchParam struct {
	Url        string                  `json:"url" form:"url"`
	Method     string                  `json:"method" form:"method"`
	Username   string                  `json:"username" form:"username"`
	Data       json.RawMessage         `json:"data" form:"data"`
	Files      []*multipart.FileHeader `json:"-" form:"-"`
	DumpedData string                  `json:"dumped_data" form:"dumped_data"`
}

type PluginApiDispatchResponse added in v0.6.0

type PluginApiDispatchResponse struct {
	*BaseResponse
	Data interface{} `json:"data"`
}

type ScheduleController

type ScheduleController struct {
	web.Controller
}

func (*ScheduleController) Get

func (c *ScheduleController) Get()

type ScheduleGetData

type ScheduleGetData struct {
	TraceID       string                 `json:"trace_id"`
	PluginVersion string                 `json:"plugin_version"`
	State         int                    `json:"state"`
	Outputs       map[string]interface{} `json:"outputs"`
	Err           string                 `json:"err,omitempty"`
	CreateAt      string                 `json:"create_at"`
	FinishAt      string                 `json:"finish_at"`
}

type ScheduleGetResponse

type ScheduleGetResponse struct {
	*BaseResponse
	Data *ScheduleGetData `json:"data"`
}

Jump to

Keyboard shortcuts

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