2022-05-23 07:04:01 +00:00
|
|
|
package authentication
|
|
|
|
|
|
|
|
// Request ...
|
|
|
|
type Request struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// CheckPermission ...
|
|
|
|
func (Request) CheckPermission(payload StaffCheckPermissionBody) (*Response, error) {
|
|
|
|
return requestNats(SubjectRequestNatsCheckPermission, toBytes(payload))
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetPermission ...
|
|
|
|
func (Request) GetPermission(payload StaffGetPermissions) (*Response, error) {
|
|
|
|
return requestNats(SubjectRequestNatsGetPermission, toBytes(payload))
|
|
|
|
}
|
2022-05-24 03:14:51 +00:00
|
|
|
|
|
|
|
// SyncData ...
|
|
|
|
func (Request) SyncData(payload ListStaff) (*Response, error) {
|
|
|
|
return requestNats(SubjectRequestNatsSyncStaff, toBytes(payload))
|
|
|
|
}
|
2022-05-24 07:31:45 +00:00
|
|
|
|
2022-05-25 03:46:34 +00:00
|
|
|
// CreateStaff ...
|
|
|
|
func (Request) CreateStaff(payload Staff) (*Response, error) {
|
|
|
|
return requestNats(SubjectRequestNatsStaffCreate, toBytes(payload))
|
|
|
|
}
|
|
|
|
|
|
|
|
// UpdateStaff ...
|
|
|
|
func (Request) UpdateStaff(payload Staff) (*Response, error) {
|
|
|
|
return requestNats(SubjectRequestNatsStaffUpdate, toBytes(payload))
|
2022-05-24 07:31:45 +00:00
|
|
|
}
|
2022-05-27 07:45:10 +00:00
|
|
|
|
|
|
|
// SaveLog ...
|
|
|
|
func (Request) SaveLog(payload Log) (*Response, error) {
|
|
|
|
return requestNats(SubjectRequestNatsAddLogs, toBytes(payload))
|
|
|
|
}
|
2022-05-30 03:21:34 +00:00
|
|
|
|
|
|
|
// GetListLogs ...
|
|
|
|
func (Request) GetListLogs(payload Log) (*Response, error) {
|
|
|
|
return requestNats(SubjectRequestNatsLogsGetList, toBytes(payload))
|
|
|
|
}
|