usersrv

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package usersrv ...

Package usersrv ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockOauth2UserService

type MockOauth2UserService struct {
	Token    string
	ClientID string
	//APIKey   string
	//UserID string
	//Hashed string
	Host     string
	UserHost string
	Proxy    px.Proxy
	Log      *lg.Logger

	MockAddUserResponse    *UserResponse
	MockUpdateUserResponse *UserResponse
	MockUser               *User
	MockUserList           *[]User
	MockUserCode           int
}

MockOauth2UserService MockOauth2UserService

func (*MockOauth2UserService) AddUser added in v0.1.1

func (u *MockOauth2UserService) AddUser(user User) *UserResponse

AddUser AddUser

func (*MockOauth2UserService) GetAdminUserList added in v0.1.1

func (u *MockOauth2UserService) GetAdminUserList(clientID string) (*[]User, int)

GetAdminUserList GetAdminUserList

func (*MockOauth2UserService) GetNew

func (u *MockOauth2UserService) GetNew() UserService

GetNew GetNew

func (*MockOauth2UserService) GetUser

func (u *MockOauth2UserService) GetUser(username string, clientID string) (*User, int)

GetUser GetUser

func (*MockOauth2UserService) SetToken

func (u *MockOauth2UserService) SetToken(token string)

SetToken SetToken

func (*MockOauth2UserService) UpdateUser

func (u *MockOauth2UserService) UpdateUser(user UpdateUser) *UserResponse

UpdateUser UpdateUser

type Oauth2UserService

type Oauth2UserService struct {
	Token    string
	ClientID string
	//APIKey   string
	//UserID string
	//Hashed string
	Host      string
	UserHost  string
	Proxy     px.Proxy
	Log       *lg.Logger
	StoreName string
}

Oauth2UserService Oauth2UserService

func (*Oauth2UserService) AddUser added in v0.1.1

func (u *Oauth2UserService) AddUser(user User) *UserResponse

AddUser AddUser

func (*Oauth2UserService) GetAdminUserList added in v0.1.1

func (u *Oauth2UserService) GetAdminUserList(clientID string) (*[]User, int)

GetAdminUserList GetAdminUserList

func (*Oauth2UserService) GetNew

func (u *Oauth2UserService) GetNew() UserService

GetNew GetNew

func (*Oauth2UserService) GetUser

func (u *Oauth2UserService) GetUser(username string, clientID string) (*User, int)

GetUser get

func (*Oauth2UserService) SetToken

func (u *Oauth2UserService) SetToken(token string)

SetToken SetToken

func (*Oauth2UserService) UpdateUser

func (u *Oauth2UserService) UpdateUser(user UpdateUser) *UserResponse

UpdateUser update

type Role

type Role struct {
	ID   int64  `json:"id"`
	Role string `json:"role"`
}

Role user role

type UpdateUser

type UpdateUser interface {
	GetType() string
}

UpdateUser interface

type User

type User struct {
	Username     string `json:"username"`
	Password     string `json:"password"`
	Enabled      bool   `json:"enabled"`
	EmailAddress string `json:"emailAddress"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	RoleID       int64  `json:"roleId"`
	ClientID     int64  `json:"clientId"`
}

User user

type UserDis

type UserDis struct {
	Username string `json:"username"`
	Enabled  bool   `json:"enabled"`
	ClientID int64  `json:"clientId"`
}

UserDis user

func (*UserDis) GetType

func (u *UserDis) GetType() string

GetType type

type UserInfo

type UserInfo struct {
	Username     string `json:"username"`
	EmailAddress string `json:"emailAddress"`
	FirstName    string `json:"firstName"`
	LastName     string `json:"lastName"`
	RoleID       int64  `json:"roleId"`
	ClientID     int64  `json:"clientId"`
}

UserInfo user

func (*UserInfo) GetType

func (u *UserInfo) GetType() string

GetType type

type UserPW

type UserPW struct {
	Username string `json:"username"`
	Password string `json:"password"`
	ClientID int64  `json:"clientId"`
	Enabled  bool   `json:"enabled"`
}

UserPW user

func (*UserPW) GetType

func (u *UserPW) GetType() string

GetType type

type UserResponse

type UserResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Code    int    `json:"code"`
}

UserResponse resp

type UserService

type UserService interface {
	AddUser(user User) *UserResponse
	UpdateUser(user UpdateUser) *UserResponse
	GetUser(username string, clientID string) (*User, int)
	GetAdminUserList(clientID string) (*[]User, int)
	SetToken(token string)
}

UserService UserService

Jump to

Keyboard shortcuts

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