users

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserTypeUnauthorized userType = iota
	UserTypeInternal
	UserTypeFeedback
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FeedbackSettings

type FeedbackSettings struct {
	ProjectID int64
	UserID    int64
}

type Settings

type Settings struct {
	DB       primedb.DB
	Cache    cache.Cache
	Redmine  redmine.Redmine
	Feedback *FeedbackSettings
}

type User

type User struct {
	TgID      int64
	RdmnID    int64 // TODO: ???
	Login     string
	FirstName string
	LastName  string
	Lang      string
	Type      userType
}

type UserUpdateData

type UserUpdateData struct {
	RedmineKey *string
	Lang       *string
}

type Users

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

func Init

func Init(s Settings) Users

func (*Users) Get

func (usrs *Users) Get(tgID int64) (User, error)

func (*Users) InternalGetByRdmnID

func (usrs *Users) InternalGetByRdmnID(rdmnID int64) (User, error)

func (*Users) MembershipsGet

func (usrs *Users) MembershipsGet(tID int64) ([]misc.IDName, error)

func (*Users) UserUpdate

func (usrs *Users) UserUpdate(tgID int64, d UserUpdateData) (User, error)

Jump to

Keyboard shortcuts

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