utils

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttrUserid  = "userid"
	AttrUnionId = "unionId"
	AttDeptId   = "deptId"
)

Variables

View Source
var ErrUserIdIsEmpty = errors.New("userId is empty")

Functions

func DoRequest

func DoRequest(method string, path string, query map[string]*string, body interface{}, opts ...*RequestOption) (response *tea.Response, err error)

func GetOpenApiConfig

func GetOpenApiConfig() (config *openapi.Config)

Types

type DingIdReduceAble

type DingIdReduceAble interface {
	SetReduceFn(fn DingIdReduceFn)
}

type DingIdReduceFn

type DingIdReduceFn func(ctx context.Context, attr string, src ...string) (dest map[string]string)

type DingIdReduceStruct

type DingIdReduceStruct struct {
	DingIdReduceFn DingIdReduceFn
}

func (*DingIdReduceStruct) Reduce

func (d *DingIdReduceStruct) Reduce(ctx context.Context, attr string, src string) (dest string)

func (*DingIdReduceStruct) ReduceBatch

func (d *DingIdReduceStruct) ReduceBatch(ctx context.Context, attr string, src ...string) (dest map[string]string)

func (*DingIdReduceStruct) SetReduceFn

func (d *DingIdReduceStruct) SetReduceFn(fn DingIdReduceFn)

type DingtalkOptions

type DingtalkOptions struct {
	AppKey    string
	AppSecret string
	AgentId   int64
}

type DintalkResponse

type DintalkResponse struct {
	ResuestId string `json:"request_id"`
	Errcode   int    `json:"errcode"`
	Errmsg    string `json:"errmsg"`
}

type RequestOption

type RequestOption struct {
	Protocal *string
	Domain   *string
	Headers  map[string]*string
}

Jump to

Keyboard shortcuts

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