facade

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

统一门面(v1.1.0)——"接口即 POST + JSON body"风格的单入口

集成方只实现一个转发 controller/endpoint:把 body JSON 转成 map 传入 Flow, 所有流程能力按 action(boot2/boot3 端点短名)路由。返回统一结构 {code, msg, data} (code=0 成功 / 99999999 失败)。

操作人约定:门面不感知登录态,args["operator"] 显式传入。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Facade

type Facade struct {
	// contains filtered or unexported fields
}

Facade 统一门面

func New

New 构造门面

func (*Facade) Flow

func (f *Facade) Flow(action string, args map[string]interface{}) (r map[string]interface{})

Flow 统一入口(action 清单见 spec §11.2)

func (*Facade) SetOrgUserProvider added in v1.6.0

func (f *Facade) SetOrgUserProvider(orgProv spi.OrgUserProvider) *Facade

SetOrgUserProvider 注入组织用户提供者(candidatePage candidateGroups 角色取人)

func (*Facade) SetUserSearch added in v1.2.0

func (f *Facade) SetUserSearch(fn UserSearch) *Facade

SetUserSearch 注入用户搜索钩子

type UserSearch added in v1.2.0

type UserSearch func(query map[string]interface{}) ([]map[string]interface{}, int, error)

UserSearch 用户搜索钩子(v1.2.0,可选)——candidatePage 无模型候选时的用户分页搜索。 返回 (rows, total, err);query 透传 pageNum/pageSize/搜索条件。

Jump to

Keyboard shortcuts

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