lark

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: BSD-3-Clause Imports: 24 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" vd:"required"`
}

type Controller

type Controller struct {
	V        *common.Values
	Passport *passport.Passport

	LarkX  *Service
	IndexX *index.Service
}

func (*Controller) Challenge

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

func (*Controller) CreateTasks

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

func (*Controller) GetTasks

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

func (*Controller) OAuth

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

func (*Controller) RedirectUrl added in v0.1.21

func (x *Controller) RedirectUrl(path string, locale string) []byte

type LoginResult

type LoginResult struct {
	User        model.User
	AccessToken string
}

type M

type M = map[string]interface{}

type OAuthDto

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

type Service

type Service struct {
	*common.Inject
	Sessions *sessions.Service
	Locker   *locker.Locker
	Passport *passport.Passport
	IndexX   *index.Service
}

func (*Service) CreateTask

func (x *Service) CreateTask(ctx context.Context) (result M, err error)

func (*Service) Decrypt

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

func (*Service) GetTasks

func (x *Service) GetTasks(ctx context.Context) (result M, err error)

func (*Service) GetTenantAccessToken

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

func (*Service) GetUserAccessToken

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

func (*Service) Login

func (x *Service) Login(ctx context.Context, openId string) (r *LoginResult, err error)

type StateDto

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

Jump to

Keyboard shortcuts

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