| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- package managesdk
- type ServiceType string
- const (
- ServiceTypePerson ServiceType = "person"
- ServiceTypeResource ServiceType = "resource"
- )
- const (
- DefaultPersonBaseURL = "http://10.0.0.210:30684/mbpms/api"
- DefaultResourceBaseURL = "http://10.0.0.210:30684/mbrms/api"
- )
- type Config struct {
- Type ServiceType
- BaseURL string
- Timeout int
- }
- type Response struct {
- Success bool `json:"success"`
- ErrCode int `json:"errCode"`
- Msg string `json:"msg"`
- }
- type IDResponse struct {
- Success bool `json:"success"`
- ErrCode int `json:"errCode"`
- Msg string `json:"msg"`
- Data string `json:"data"`
- }
- type MsgResponse struct {
- Success bool `json:"success"`
- ErrCode int `json:"errCode"`
- Msg string `json:"msg"`
- }
- type InfosData[T any] struct {
- Infos []T `json:"infos"`
- TotalCount int64 `json:"totalCount"`
- }
- type InfosResponse[T any] struct {
- Success bool `json:"success"`
- ErrCode int `json:"errCode"`
- Msg string `json:"msg"`
- Data InfosData[T] `json:"data"`
- }
- type InfoResponse[T any] struct {
- Success bool `json:"success"`
- ErrCode int `json:"errCode"`
- Msg string `json:"msg"`
- Data T `json:"data"`
- }
- type MapResponse struct {
- Success bool `json:"success"`
- ErrCode int `json:"errCode"`
- Msg string `json:"msg"`
- Data map[string]any `json:"data"`
- }
- type VersionResponse struct {
- Success bool `json:"success"`
- ErrCode int `json:"errCode"`
- Msg string `json:"msg"`
- Data map[string]any `json:"data"`
- }
- type BaseQueryParams struct {
- PageNo int `form:"pageNo"`
- PageSize int `form:"pageSize"`
- }
- type PersonInfo struct {
- ID string `json:"id"`
- Name string `json:"name"`
- UserID string `json:"userId"`
- ExtendPropertyValues map[string]any `json:"extendProperties"`
- TenantID string `json:"tenantId"`
- CreatedTime string `json:"createdTime"`
- LastUpdatedTime string `json:"lastUpdatedTime"`
- }
- type SavePersonParams struct {
- ID string `json:"id"`
- Name string `json:"name"`
- UserID string `json:"userId"`
- ExtendProperties map[string]any `json:"extendProperties"`
- TenantID string `json:"tenantId"`
- OperatorUserName string `json:"operatorUserName"`
- }
- type DeletePersonParams struct {
- ID string `form:"id"`
- OperatorUserName string `form:"operatorUserName"`
- }
- type QueryPersonsParams struct {
- Name string `form:"name"`
- UserID string `form:"userId"`
- ExtendPropertyValues map[string]any `form:"extendPropertyValues"`
- TenantID string `form:"tenantId"`
- BaseQueryParams
- }
- type GetPersonParams struct {
- ID string `form:"id"`
- }
- type GenderInfo struct {
- Gender string `json:"gender"`
- Label string `json:"label"`
- }
- type PersonStateInfo struct {
- State string `json:"state"`
- Label string `json:"label"`
- }
- type ResourceInfo struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Code string `json:"code"`
- BusinessType string `json:"businessType"`
- ExtendPropertyValues map[string]any `json:"extendProperties"`
- TenantID string `json:"tenantId"`
- CreateUserID string `json:"createUserId"`
- LastUpdateUserID string `json:"lastUpdateUserId"`
- CreatedTime string `json:"createdTime"`
- LastUpdatedTime string `json:"lastUpdatedTime"`
- }
- type SaveResourceParams struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Code string `json:"code"`
- BusinessType string `json:"businessType"`
- ExtendProperties map[string]any `json:"extendProperties"`
- TenantID string `json:"tenantId"`
- CreateUserID string `json:"createUserId"`
- UpdateUserID string `json:"updateUserId"`
- OperatorUserName string `json:"operatorUserName"`
- }
- type DeleteResourceParams struct {
- ID string `form:"id"`
- DeleteUserID string `form:"deleteUserId"`
- OperatorUserName string `form:"operatorUserName"`
- }
- type QueryResourcesParams struct {
- Name string `form:"name"`
- BusinessType string `form:"businessType"`
- ExtendPropertyValues map[string]any `form:"extendPropertyValues"`
- UserID string `form:"userId"`
- QueryMode string `form:"queryMode"`
- CreateUserID string `form:"createUserId"`
- TenantID string `form:"tenantId"`
- BaseQueryParams
- }
- type GetResourceParams struct {
- ID string `form:"id"`
- }
- type CategoryInfo struct {
- Category string `json:"category"`
- ExcludeField []string `json:"excludeField"`
- }
- type ResourceStateInfo struct {
- State string `json:"state"`
- Label string `json:"label"`
- }
- type OperateLogQueryParams struct {
- Resource string `form:"resource"`
- Action string `form:"action"`
- OperatorName string `form:"operatorName"`
- StartTime string `form:"startTime"`
- EndTime string `form:"endTime"`
- TenantID string `form:"tenantId"`
- BaseQueryParams
- }
- type OperateLogInfo struct {
- ID string `json:"id"`
- Resource string `json:"resource"`
- Action string `json:"action"`
- OperatorName string `json:"operatorName"`
- Content string `json:"content"`
- TenantID string `json:"tenantId"`
- CreatedTime string `json:"createdTime"`
- }
|