grpcclient

package
v0.0.0-...-2d08cc7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartAuthClient

func StartAuthClient()

func StartOrgClient

func StartOrgClient()

func StopGrpcClient

func StopGrpcClient()

func StopOrgClient

func StopOrgClient()

Types

type AuthInfo

type AuthInfo struct {
	Authorised  bool
	Tenant      string
	Domain      string
	Department  string
	Name        string
	EmailId     string
	PhoneNumber string
	Role        string
	OrgName     string
}

func GetAuthInfo

func GetAuthInfo(r *http.Request) AuthInfo

type AuthUpdateInfo

type AuthUpdateInfo struct {
	Id          string
	ImageURL    string
	Role        string
	Department  string
	Designation string
	Domain      string
}

type DepAttendanceConf

type DepAttendanceConf struct {
	DepId                   string
	Department              string
	CaptureCheckInLocation  bool
	EnforceLocationCheckIn  bool
	EnforceLocationCheckOut bool
	RequiredLat             float64
	RequiredLng             float64
	FlexiHoursEnabled       bool
	FlexiHourWindowInMin    int32
	OrgCheckInTime          string
	OrgCheckOutTime         string
	CheckinMarginInMin      int32
	DailyWorkingHours       float32
	WorkingDaysPerWeek      float32
	WeeklyOffDays           []string
}

type EmailTokenInfo

type EmailTokenInfo struct {
	TenantId     string
	Domain       string
	SubDomain    string
	EmailId      string
	SecretId     string
	Name         string
	IsError      bool
	ErrorMessage string
}

type GrpcClient

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

func GetAuthClient

func GetAuthClient() *GrpcClient

func (*GrpcClient) GetNewEmailToken

func (a *GrpcClient) GetNewEmailToken(tenantId, domain, subDomain, emailId, secretId, name string) (string, error)

func (*GrpcClient) UpdateInfo

func (a *GrpcClient) UpdateInfo(id, imageURL, role, designation, department, domain string) (string, error)

func (*GrpcClient) Verify

func (a *GrpcClient) Verify(accessToken string, routeName string) (AuthInfo, error)

func (*GrpcClient) VerifyEmailToken

func (a *GrpcClient) VerifyEmailToken(token, domain string) (EmailTokenInfo, error)

type OrgAttendanceConf

type OrgAttendanceConf struct {
	OrgId                   string
	OrgName                 string
	CaptureCheckInLocation  bool
	EnforceLocationCheckIn  bool
	EnforceLocationCheckOut bool
	RequiredLat             float64
	RequiredLng             float64
	FlexiHoursEnabled       bool
	FlexiHourWindowInMin    int32
	OrgCheckInTime          string
	OrgCheckOutTime         string
	CheckinMarginInMin      int32
	DailyWorkingHours       float32
	WorkingDaysPerWeek      float32
	WeeklyOffDays           []string
}

type OrgClient

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

func GetOrgClient

func GetOrgClient() *OrgClient

func (*OrgClient) GetDepAttendanceConf

func (a *OrgClient) GetDepAttendanceConf(depName, domain string) (DepAttendanceConf, error)

func (*OrgClient) GetOrgAttendanceConf

func (a *OrgClient) GetOrgAttendanceConf(orgName, domain string) (OrgAttendanceConf, error)

func (*OrgClient) GetOrgLeaveConf

func (a *OrgClient) GetOrgLeaveConf(orgName, domain string) (OrgLeaveObj, error)

func (*OrgClient) InitOrganization

func (a *OrgClient) InitOrganization(e OrgInitInfo) (string, error)

func (*OrgClient) OrgAddEmployee

func (a *OrgClient) OrgAddEmployee(e OrgEmployeeInfo) (string, error)

func (*OrgClient) OrgRemoveEmployee

func (a *OrgClient) OrgRemoveEmployee(e OrgEmployeeInfo) (string, error)

func (*OrgClient) OrgUpdateEmployee

func (a *OrgClient) OrgUpdateEmployee(e OrgEmployeeInfo) (string, error)

type OrgEmployeeInfo

type OrgEmployeeInfo struct {
	Domain          string
	EmployeeId      string
	Department      string
	Designation     string
	Name            string
	Status          string
	ProfileImageURL string
	EmailId         string
}

type OrgInitInfo

type OrgInitInfo struct {
	Id                string
	EID               string
	Domain            string
	OrgName           string
	AdminEmailId      string
	AdminPhoneNumber  string
	AdminName         string
	Department        string
	Designation       string
	EmailVerified     bool
	Password          string
	Role              string
	FirstLoginPending bool
	Status            string
	UseGoogleOAuth    bool
}

type OrgLeaveConfiguration

type OrgLeaveConfiguration struct {
	OrgName                     string
	Title                       string
	IsFixed                     bool    `bson:"is_fixed"`
	Frequency                   string  `bson:"frequency"`
	LeaveCount                  float32 `bson:"leave_count"`
	LeaveUnit                   string  `bson:"leave_unit"`
	MaxLeaveCount               float32 `bson:"max_leave_count"`
	IsCarryForwardAllowed       bool    `bson:"is_carry_forward_allowed"`
	MaxCarryForwardCount        float32 `bson:"max_carry_forward_count"`
	BulkLeaveCount              int     `bson:"bulk_leave_count"`
	BulkLeaveNoticeInDays       int     `bson:"bulk_leave_notice_in_days"`
	IsEncashmentAllowed         bool    `bson:"encashment_allowed"`
	ApplicableAfterWorkingDays  int     `bson:"applicable_after_working_days"`
	DocumentRequired            bool    `bson:"document_required"`
	WeeklyOffAndHolidayIncluded bool    `bson:"weekly_off_and_holiday_included"`
	IsActive                    bool    `bson:"is_active"`
	Description                 string  `bson:"description"`
	YearStartDate               string  `bson:"year_start_date"`
	YearEndDate                 string  `bson:"year_end_date"`
}

type OrgLeaveObj

type OrgLeaveObj struct {
	OrgName                string
	OrgLeaveConfigurations []OrgLeaveConfiguration
}

Jump to

Keyboard shortcuts

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