service

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginService

type LoginService interface {
	UserService
	ListUsers(ctx context.Context, start uint64, end uint64, filter string) (uint64, []User, error)
	Delete(ctx context.Context, userId uint64) error
	Verify(ctx context.Context, login string, password string) (uint64, error)
	Register(ctx context.Context, login string, password string) (uint64, error)
	ChangeLogin(ctx context.Context, userId uint64, oldLogin string, newLogin string, password string) error
	ChangePassword(ctx context.Context, userId uint64, login string, oldPassword string, newPassword string) error
}

type ProfileService

type ProfileService interface {
	GetProfiles(ctx context.Context, userIds []uint64) (map[uint64]UserProfile, error)
	GetPicture(ctx context.Context, userId uint64) []byte
	UpdateProfile(ctx context.Context, userId uint64, desc string, info map[string]string) error
	UpdatePicture(ctx context.Context, userId uint64, data []byte) error
	Delete(ctx context.Context, userId uint64) error
	ViewRight(ctx context.Context, userId uint64) error
}

type User

type User struct {
	Id          uint64
	Login       string
	RegistredAt string
}

type UserProfile

type UserProfile struct {
	User
	Desc string
	Info map[string]string
}

type UserService

type UserService interface {
	GetUsers(ctx context.Context, userIds []uint64) (map[uint64]User, error)
}

Jump to

Keyboard shortcuts

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