Trait br_plugin::action::Action

source ·
pub trait Action {
Show 31 methods // Required methods fn title(&mut self) -> &'static str; fn api(&mut self) -> &'static str; fn index(&mut self, header: JsonValue, request: JsonValue) -> Response; // Provided methods fn author(&mut self) -> &'static str { ... } fn mode(&mut self) -> Vec<&'static str> { ... } fn menu(&mut self) -> bool { ... } fn icon(&mut self) -> &'static str { ... } fn menu_sort(&mut self) -> usize { ... } fn tags(&mut self) -> Vec<&'static str> { ... } fn is_openapi(&mut self) -> bool { ... } fn token(&mut self) -> bool { ... } fn describe(&mut self) -> &'static str { ... } fn public(&mut self) -> bool { ... } fn auth(&mut self) -> bool { ... } fn interface_type(&mut self) -> &'static str { ... } fn dependent(&mut self) -> Vec<&'static str> { ... } fn params(&mut self) -> JsonValue { ... } fn _check(&mut self, request: JsonValue) -> (bool, String, JsonValue) { ... } fn run(&mut self, header: JsonValue, request: JsonValue) -> Response { ... } fn success(&mut self, data: JsonValue, msg: &str) -> Response { ... } fn fail(&mut self, msg: &str) -> Response { ... } fn login(&mut self, msg: &str) -> Response { ... } fn download(&mut self, filename: &str) -> Response { ... } fn redirect(&mut self, url: &str) -> Response { ... } fn tools(&mut self) -> Tools { ... } fn tx(&mut self) -> Sender<JsonValue> { ... } fn menu_info(&mut self, title: &str) -> JsonValue { ... } fn btn_info_data(&mut self, title: &str) -> JsonValue { ... } fn btn_info( &mut self, title: &str, mode: BtnMode, color: BtnColor, match_condition: Vec<Vec<&str>> ) -> JsonValue { ... } fn btn_info_to( &mut self, title: &str, path: &str, mode: BtnMode, color: BtnColor, match_condition: Vec<Vec<&str>> ) -> JsonValue { ... } fn btn_custom_info(&mut self, title: &str) -> JsonValue { ... }
}
Expand description

动作

Required Methods§

source

fn title(&mut self) -> &'static str

动标题

source

fn api(&mut self) -> &'static str

动作api

source

fn index(&mut self, header: JsonValue, request: JsonValue) -> Response

Provided Methods§

source

fn author(&mut self) -> &'static str

作者

source

fn mode(&mut self) -> Vec<&'static str>

支持模式 org 企业模式 admin 平台模式 user 普通模式

source

fn menu(&mut self) -> bool

菜单

source

fn icon(&mut self) -> &'static str

菜单 icon

source

fn menu_sort(&mut self) -> usize

菜单排序

source

fn tags(&mut self) -> Vec<&'static str>

标签

source

fn is_openapi(&mut self) -> bool

是否开放接口

source

fn token(&mut self) -> bool

是否使用密钥

source

fn describe(&mut self) -> &'static str

API描述

source

fn public(&mut self) -> bool

是否公开

source

fn auth(&mut self) -> bool

是否权限组显示

source

fn interface_type(&mut self) -> &'static str

接口类型 btn api

source

fn dependent(&mut self) -> Vec<&'static str>

依赖接口

source

fn params(&mut self) -> JsonValue

请求参数入口

source

fn _check(&mut self, request: JsonValue) -> (bool, String, JsonValue)

检测

source

fn run(&mut self, header: JsonValue, request: JsonValue) -> Response

执行参数入口

source

fn success(&mut self, data: JsonValue, msg: &str) -> Response

业务成功返回

source

fn fail(&mut self, msg: &str) -> Response

业务错误返回

source

fn login(&mut self, msg: &str) -> Response

登陆返回

source

fn download(&mut self, filename: &str) -> Response

下载返回

source

fn redirect(&mut self, url: &str) -> Response

重定型返回

source

fn tools(&mut self) -> Tools

获取工具集合

source

fn tx(&mut self) -> Sender<JsonValue>

获取共享消息通道

source

fn menu_info(&mut self, title: &str) -> JsonValue

获取菜单信息

  • title 菜单名称
source

fn btn_info_data(&mut self, title: &str) -> JsonValue

source

fn btn_info( &mut self, title: &str, mode: BtnMode, color: BtnColor, match_condition: Vec<Vec<&str>> ) -> JsonValue

获取按钮信息

  • title 菜单名称
  • mode 按钮模式
  • color 按钮颜色
  • match_condition 显示条件
source

fn btn_info_to( &mut self, title: &str, path: &str, mode: BtnMode, color: BtnColor, match_condition: Vec<Vec<&str>> ) -> JsonValue

获取跳转按钮信息

  • title 菜单名称
  • mode 按钮模式
  • color 按钮颜色
  • match_condition 显示条件
source

fn btn_custom_info(&mut self, title: &str) -> JsonValue

获取自定义页面按钮信息

  • title 菜单名称
  • mode 按钮模式
  • color 按钮颜色
  • match_condition 显示条件

Implementors§