Help us shape the future of Go! Take the 2026 Go Developer Survey

feishu

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Provides = wire.NewSet(
	wire.Struct(new(Controller), "*"),
	wire.Struct(new(Service), "*"),
)

Functions

This section is empty.

Types

type ChallengeDto

type ChallengeDto struct {
	Encrypt string `json:"encrypt,required"`
}

type Controller

type Controller struct {
	IndexService  *index.Service
	FeishuService *Service
	Values        *common.Values
	Passport      *passport.Passport
}

func (*Controller) Challenge

func (x *Controller) Challenge(ctx context.Context, c *app.RequestContext)

Challenge 事件订阅

func (*Controller) OAuth

func (x *Controller) OAuth(ctx context.Context, c *app.RequestContext)

OAuth 第三方登录与关联

type OAuthDto

type OAuthDto struct {
	Code  string   `query:"code,required"`
	State StateDto `query:"state"`
}

type Service

type Service struct {
	*common.Inject
	SessionsService *sessions.Service
	Locker          *locker.Locker
	Passport        *passport.Passport
}

func (*Service) Decrypt

func (x *Service) Decrypt(encrypt string, key string) (string, error)

Decrypt 解密

func (*Service) GetTenantAccessToken

func (x *Service) GetTenantAccessToken(ctx context.Context) (token string, err error)

GetTenantAccessToken 获取 TenantAccessToken

func (*Service) GetUserAccessToken

func (x *Service) GetUserAccessToken(ctx context.Context, code string) (_ model.FeishuUserData, err error)

GetUserAccessToken 获取 AccessToken

func (x *Service) Link(ctx context.Context, userId string, data model.FeishuUserData) (_ *mongo.UpdateResult, err error)

Link 关联

func (*Service) Login

func (x *Service) Login(ctx context.Context, openId string, metadata *model.LoginMetadata) (ts string, err error)

Login 免登陆

type StateDto

type StateDto struct {
	Action string `json:"action,omitempty"`
}

Jump to

Keyboard shortcuts

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