biz

package
v0.0.0-...-16ed941 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 9 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is biz providers.

Functions

This section is empty.

Types

type ChartRepo

type ChartRepo interface {
	ListChart(ctx context.Context, client, userId, typeChart string) (results []*adapter.ChartData, err error)
	GetChart(ctx context.Context, client, userId string, chartId uint32) (result *adapter.ChartData, err error)
	InsertChart(ctx context.Context, c *adapter.ChartData) (err error)
	UpdateChart(ctx context.Context, c *adapter.ChartData) (err error)
	MaxChartId(ctx context.Context, client, userId string) (id uint32, err error)
	DeleteChart(ctx context.Context, client, userId string, chartId uint32) (err error)
	UpsertTemplate(ctx context.Context, c *adapter.ChartData) (err error)
	GetTemplate(ctx context.Context, client, userId, name string) (result *adapter.ChartData, err error)
	DeleteTemplate(ctx context.Context, client, userId, name string) (err error)
}

type ChartUsecase

type ChartUsecase struct {
	// contains filtered or unexported fields
}

func NewChartUsecase

func NewChartUsecase(repo ChartRepo) *ChartUsecase

func (*ChartUsecase) DeleteChart

func (*ChartUsecase) DeleteStudyTemplates

func (*ChartUsecase) ListChart

func (*ChartUsecase) ListStudyTemplate

func (*ChartUsecase) LoadChart

func (*ChartUsecase) LoadStudyTemplate

func (*ChartUsecase) SaveAsChart

func (*ChartUsecase) SaveChart

func (*ChartUsecase) SaveStudyTemplate

type Profile

type Profile struct {
	ID               uuid.UUID `json:"id,omitempty"`
	CreatedAt        time.Time `json:"created_at,omitempty"`
	UpdatedAt        time.Time `json:"updated_at,omitempty"`
	UserID           string    `json:"user_id,omitempty"`
	FullName         string    `json:"full_name,omitempty"`
	Email            string    `json:"email,omitempty"`
	EmailConfirmedAt time.Time `json:"email_confirmed_at,omitempty"`
	Phone            string    `json:"phone,omitempty"`
	PhoneConfirmedAt time.Time `json:"phone_confirmed_at,omitempty"`
	ReferralCode     string    `json:"referral_code,omitempty"`
	IsSSOUser        bool      `json:"is_sso_user,omitempty"`
	Language         string    `json:"language,omitempty"`
}

type ProfileRepo

type ProfileRepo interface {
	CreateProfile(ctx context.Context, profile *Profile) (*Profile, error)
	GetProfile(ctx context.Context, userId string) (*Profile, error)
	QueryProfile(ctx context.Context, req *Profile) (*Profile, error)
	QueryProfilesByListUserIds(ctx context.Context, userIds []string) ([]*Profile, error)
	UpdateLanguage(ctx context.Context, userId string, language string) (*Profile, error)
}

type ProfileUsecase

type ProfileUsecase struct {
	// contains filtered or unexported fields
}

func NewProfileUsecase

func NewProfileUsecase(repo ProfileRepo) *ProfileUsecase

func (*ProfileUsecase) CreateProfile

func (uc *ProfileUsecase) CreateProfile(ctx context.Context, profile Profile) (*Profile, error)

func (*ProfileUsecase) GetProfile

func (uc *ProfileUsecase) GetProfile(ctx context.Context, userId string) (*Profile, error)

func (*ProfileUsecase) QueryProfile

func (uc *ProfileUsecase) QueryProfile(ctx context.Context, req *Profile) (*Profile, error)

func (*ProfileUsecase) QueryProfiles

func (uc *ProfileUsecase) QueryProfiles(ctx context.Context, userIds []string) ([]*Profile, error)

func (*ProfileUsecase) UpdateLanguage

func (uc *ProfileUsecase) UpdateLanguage(ctx context.Context, userId, language string) (*Profile, error)

Jump to

Keyboard shortcuts

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