account

package
v0.0.0-...-744bbcf Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPlatformId

func GetPlatformId() int

func NewBusinessContext

func NewBusinessContext(ctx context.Context, request *http.Request, userId int, jwtToken string, rawData *simplejson.Json) context.Context

Types

type Corp

type Corp struct {
	eel.EntityBase
	Id int

	PlatformId int
	CorpUser   *CorpUser
}

func GetCorpFromContext

func GetCorpFromContext(ctx context.Context) *Corp

func NewCorpFromOnlyId

func NewCorpFromOnlyId(ctx context.Context, id int) *Corp

func NewInvalidCorp

func NewInvalidCorp(ctx context.Context) *Corp

func (*Corp) GetId

func (this *Corp) GetId() int

func (*Corp) GetPlatformId

func (this *Corp) GetPlatformId() int

func (*Corp) IsPlatform

func (this *Corp) IsPlatform() bool

func (*Corp) IsValid

func (this *Corp) IsValid() bool

type CorpRepository

type CorpRepository struct {
	eel.ServiceBase
}

func NewCorpRepository

func NewCorpRepository(ctx context.Context) *CorpRepository

func (*CorpRepository) GetCorpById

func (this *CorpRepository) GetCorpById(corpId int) *Corp

type CorpUser

type CorpUser struct {
	eel.EntityBase
	Id        int
	Name      string
	CreatedAt time.Time
}

func NewCorpUserFromId

func NewCorpUserFromId(ctx context.Context, corpUserId int) *CorpUser

func (*CorpUser) GetId

func (this *CorpUser) GetId() int

type CorpUserRepository

type CorpUserRepository struct {
	eel.ServiceBase
}

func NewCorpUserRepository

func NewCorpUserRepository(ctx context.Context) *CorpUserRepository

func (*CorpUserRepository) GetCorpUsers

func (this *CorpUserRepository) GetCorpUsers(ids []int) []*CorpUser

type EncodeUserService

type EncodeUserService struct {
	eel.ServiceBase
}

func NewEncodeUserService

func NewEncodeUserService(ctx context.Context) *EncodeUserService

func (*EncodeUserService) Encode

func (this *EncodeUserService) Encode(user *User) *RUser

func (*EncodeUserService) EncodeMany

func (this *EncodeUserService) EncodeMany(users []*User) []*RUser

type RUser

type RUser struct {
	Id     int    `json:"id"`
	Name   string `json:"name"`
	Avatar string `json:"avatar"`
	Sex    string `json:"sex"`
	Code   string `json:"code"`
}

type User

type User struct {
	eel.EntityBase
	Id         int
	PlatformId int
	Unionid    string
	Name       string
	Avatar     string
	Sex        string
	Code       string
	Source     string
	RawData    *simplejson.Json
	CreatedAt  time.Time
}

func GetUserFromContext

func GetUserFromContext(ctx context.Context) *User

func NewUserFromOnlyId

func NewUserFromOnlyId(ctx context.Context, id int) *User

func (*User) GetAvatar

func (this *User) GetAvatar() string

func (*User) GetId

func (this *User) GetId() int

func (*User) GetName

func (this *User) GetName() string

type UserRepository

type UserRepository struct {
	eel.ServiceBase
}

func NewUserRepository

func NewUserRepository(ctx context.Context) *UserRepository

func (*UserRepository) GetUserById

func (this *UserRepository) GetUserById(id int) *User

func (*UserRepository) GetUsers

func (this *UserRepository) GetUsers(ids []int) []*User

Jump to

Keyboard shortcuts

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