Documentation ¶
Index ¶
- type CustomerRepoImpl
- func (r *CustomerRepoImpl) CreateCustomer(ctx context.Context, req customerRequest.CreateCustomerReq) error
- func (r *CustomerRepoImpl) CustomerList(ctx context.Context, req customerRequest.CustomerListReq) (res response.CustomerList, err error)
- func (r *CustomerRepoImpl) CustomerListTotal(ctx context.Context, req customerRequest.CustomerListReq) (int, error)
- func (r *CustomerRepoImpl) GetCustomer(ctx context.Context, customerId string) (res response.CustomerRes, err error)
- func (r *CustomerRepoImpl) PaginationQuery(ctx context.Context, builder squirrel.SelectBuilder, ...) (pgx.Rows, error)
- func (r *CustomerRepoImpl) ReadApiKey(ctx context.Context, customerUUID string) (res string, err error)
- func (r *CustomerRepoImpl) SetApiKey(ctx context.Context, req customerRequest.CustomerSetApiKeyReq) (err error)
- func (r *CustomerRepoImpl) SetDisabledStatusCustomer(ctx context.Context, req customerRequest.SetEnabledStatusCustomer) error
- func (r *CustomerRepoImpl) UpdateCustomer(ctx context.Context, req customerRequest.UpdateCustomerReq) error
- type GoCloakImpl
- func (k *GoCloakImpl) CreateCustomer(ctx context.Context, req customerRequest.CreateCustomerReq) (string, error)
- func (k *GoCloakImpl) CreateGroup(ctx context.Context, req groupRequest.CreateGroupReq) (string, error)
- func (k *GoCloakImpl) CreateUser(ctx context.Context, req userRequest.CreateUserReq) (string, error)
- func (k *GoCloakImpl) DeleteUser(ctx context.Context, req userRequest.DeleteUserReq) error
- func (k *GoCloakImpl) GetUserInfo(ctx context.Context, req userRequest.GetUserInfoReq) (res entity.UserInfo, err error)
- func (k *GoCloakImpl) SetEnabledStatusUser(ctx context.Context, req userRequest.SetEnabledStatusUserReq) error
- func (k *GoCloakImpl) UpdateUser(ctx context.Context, req userRequest.UpdateUserReq) error
- type GroupRepoImpl
- func (r *GroupRepoImpl) CreateGroup(ctx context.Context, req groupRequest.CreateGroupReq) error
- func (r *GroupRepoImpl) GetGroup(ctx context.Context, groupId string) (res response.GroupRes, err error)
- func (r *GroupRepoImpl) GroupList(ctx context.Context, req groupRequest.GroupListReq) (res response.GroupList, err error)
- func (r *GroupRepoImpl) GroupListTotal(ctx context.Context) (int, error)
- func (r *GroupRepoImpl) PaginationQuery(ctx context.Context, builder squirrel.SelectBuilder, ...) (pgx.Rows, error)
- func (r *GroupRepoImpl) UpdateGroup(ctx context.Context, req groupRequest.UpdateGroupReq) error
- type KeyCloak
- type UserRepoImpl
- func (r *UserRepoImpl) CreateUser(ctx context.Context, req userRequest.CreateUserReq) error
- func (userRepo *UserRepoImpl) GetCustomerUUIDByUserName(ctx context.Context, userName string) (customerUUID string, err error)
- func (r *UserRepoImpl) GetUserInfo(ctx context.Context, req userRequest.GetUserInfoReq, requestPermission string) (res entity.UserInfo, err error)
- func (r *UserRepoImpl) PaginationQuery(ctx context.Context, builder squirrel.SelectBuilder, ...) (pgx.Rows, error)
- func (r *UserRepoImpl) SetEnabledStatusUser(ctx context.Context, req userRequest.SetEnabledStatusUserReq, ...) (*string, error)
- func (r *UserRepoImpl) UpdateUser(ctx context.Context, req userRequest.UpdateUserReq) errordeprecated
- func (r *UserRepoImpl) UserList(ctx context.Context, req userRequest.UserListReq) (res entity.UserList, err error)
- func (r *UserRepoImpl) UserListTotal(ctx context.Context) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomerRepoImpl ¶
func NewCustomerRepo ¶
func NewCustomerRepo(pg *postgres.Postgres) *CustomerRepoImpl
func (*CustomerRepoImpl) CreateCustomer ¶
func (r *CustomerRepoImpl) CreateCustomer(ctx context.Context, req customerRequest.CreateCustomerReq) error
func (*CustomerRepoImpl) CustomerList ¶
func (r *CustomerRepoImpl) CustomerList(ctx context.Context, req customerRequest.CustomerListReq) (res response.CustomerList, err error)
func (*CustomerRepoImpl) CustomerListTotal ¶
func (r *CustomerRepoImpl) CustomerListTotal(ctx context.Context, req customerRequest.CustomerListReq) (int, error)
func (*CustomerRepoImpl) GetCustomer ¶
func (r *CustomerRepoImpl) GetCustomer(ctx context.Context, customerId string) (res response.CustomerRes, err error)
func (*CustomerRepoImpl) PaginationQuery ¶
func (r *CustomerRepoImpl) PaginationQuery(ctx context.Context, builder squirrel.SelectBuilder, page customerRequest.Pagination) (pgx.Rows, error)
func (*CustomerRepoImpl) ReadApiKey ¶
func (*CustomerRepoImpl) SetApiKey ¶
func (r *CustomerRepoImpl) SetApiKey(ctx context.Context, req customerRequest.CustomerSetApiKeyReq) (err error)
func (*CustomerRepoImpl) SetDisabledStatusCustomer ¶
func (r *CustomerRepoImpl) SetDisabledStatusCustomer(ctx context.Context, req customerRequest.SetEnabledStatusCustomer) error
func (*CustomerRepoImpl) UpdateCustomer ¶
func (r *CustomerRepoImpl) UpdateCustomer(ctx context.Context, req customerRequest.UpdateCustomerReq) error
type GoCloakImpl ¶
type GoCloakImpl struct { Token *gocloak.JWT Client gocloak.GoCloak ClientId string UserName string ClientSecret string Realm string }
func NewKeyCloak ¶
func (*GoCloakImpl) CreateCustomer ¶
func (k *GoCloakImpl) CreateCustomer(ctx context.Context, req customerRequest.CreateCustomerReq) (string, error)
func (*GoCloakImpl) CreateGroup ¶
func (k *GoCloakImpl) CreateGroup(ctx context.Context, req groupRequest.CreateGroupReq) (string, error)
func (*GoCloakImpl) CreateUser ¶
func (k *GoCloakImpl) CreateUser(ctx context.Context, req userRequest.CreateUserReq) (string, error)
func (*GoCloakImpl) DeleteUser ¶
func (k *GoCloakImpl) DeleteUser(ctx context.Context, req userRequest.DeleteUserReq) error
func (*GoCloakImpl) GetUserInfo ¶
func (k *GoCloakImpl) GetUserInfo(ctx context.Context, req userRequest.GetUserInfoReq) (res entity.UserInfo, err error)
func (*GoCloakImpl) SetEnabledStatusUser ¶
func (k *GoCloakImpl) SetEnabledStatusUser(ctx context.Context, req userRequest.SetEnabledStatusUserReq) error
func (*GoCloakImpl) UpdateUser ¶
func (k *GoCloakImpl) UpdateUser(ctx context.Context, req userRequest.UpdateUserReq) error
type GroupRepoImpl ¶
func NewGroupRepo ¶
func NewGroupRepo(pg *postgres.Postgres) *GroupRepoImpl
func (*GroupRepoImpl) CreateGroup ¶
func (r *GroupRepoImpl) CreateGroup(ctx context.Context, req groupRequest.CreateGroupReq) error
func (*GroupRepoImpl) GroupList ¶
func (r *GroupRepoImpl) GroupList(ctx context.Context, req groupRequest.GroupListReq) (res response.GroupList, err error)
func (*GroupRepoImpl) GroupListTotal ¶
func (r *GroupRepoImpl) GroupListTotal(ctx context.Context) (int, error)
func (*GroupRepoImpl) PaginationQuery ¶
func (r *GroupRepoImpl) PaginationQuery(ctx context.Context, builder squirrel.SelectBuilder, page groupRequest.Pagination) (pgx.Rows, error)
func (*GroupRepoImpl) UpdateGroup ¶
func (r *GroupRepoImpl) UpdateGroup(ctx context.Context, req groupRequest.UpdateGroupReq) error
type UserRepoImpl ¶
func NewUserRepo ¶
func NewUserRepo(pg *postgres.Postgres) *UserRepoImpl
func (*UserRepoImpl) CreateUser ¶
func (r *UserRepoImpl) CreateUser(ctx context.Context, req userRequest.CreateUserReq) error
func (*UserRepoImpl) GetCustomerUUIDByUserName ¶
func (*UserRepoImpl) GetUserInfo ¶
func (r *UserRepoImpl) GetUserInfo(ctx context.Context, req userRequest.GetUserInfoReq, requestPermission string) (res entity.UserInfo, err error)
func (*UserRepoImpl) PaginationQuery ¶
func (r *UserRepoImpl) PaginationQuery(ctx context.Context, builder squirrel.SelectBuilder, page userRequest.Pagination) (pgx.Rows, error)
func (*UserRepoImpl) SetEnabledStatusUser ¶
func (r *UserRepoImpl) SetEnabledStatusUser(ctx context.Context, req userRequest.SetEnabledStatusUserReq, requestPermission string) (*string, error)
SetEnabledStatusUser выполняет запрос вида
update customers.users set enabled = {req.Enabled} where user_uuid = {req.UserId} and user_uuid in (
select u.user_uuid from ( {requestPermission} ) as u
)
func (*UserRepoImpl) UpdateUser
deprecated
func (r *UserRepoImpl) UpdateUser(ctx context.Context, req userRequest.UpdateUserReq) error
Deprecated: 123
func (*UserRepoImpl) UserList ¶
func (r *UserRepoImpl) UserList(ctx context.Context, req userRequest.UserListReq) (res entity.UserList, err error)
func (*UserRepoImpl) UserListTotal ¶
func (r *UserRepoImpl) UserListTotal(ctx context.Context) (int, error)
Click to show internal directories.
Click to hide internal directories.