utils

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: MIT Imports: 7 Imported by: 1

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 added in v0.0.5

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 added in v0.0.4

type DingIdReduceAble interface {
	SetReduceFn(fn DingIdReduceFn)
}

type DingIdReduceFn

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

type DingIdReduceStruct added in v0.0.4

type DingIdReduceStruct struct {
	DingIdReduceFn DingIdReduceFn
}

func (*DingIdReduceStruct) Reduce added in v0.0.4

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

func (*DingIdReduceStruct) ReduceBatch added in v0.0.4

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

func (*DingIdReduceStruct) SetReduceFn added in v0.0.4

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 added in v0.0.5

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