gohr

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.1.2

type Client struct {
	AppConf  dto.AppConf
	GoHrConf dto.GoHrConf
}

func (*Client) BeforeSecret added in v0.1.2

func (c *Client) BeforeSecret(input dto.SecretInput) (dto.SecretRes, error)

BeforeSecret -

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.BeforeSecret(dto.SecretInput{})
fmt.Println(s)
Output:

func (*Client) DecodeSecret added in v0.1.2

func (c *Client) DecodeSecret(input []map[string]string) (dto.SecretRes, error)

DecodeSecret 解密

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

var input = []map[string]string{}
s, _ := p.DecodeSecret(input)
fmt.Println(s)
Output:

func (*Client) GetFullToTal added in v0.1.2

func (c *Client) GetFullToTal(input dto.QuitOrTalInput) (dto.TalDataRes, error)

GetFullToTal 全转专

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.GetFullToTal(dto.QuitOrTalInput{})
fmt.Println(s)
Output:

func (*Client) GetHonorUserInfo added in v0.1.2

func (c *Client) GetHonorUserInfo(input dto.HonorUserInfoInput) (dto.HonorUserInfoRes, error)

GetHonorUserInfo 荣耀:获取用户详情

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

var input = dto.HonorUserInfoInput{
	AppID:    "12212",
	Workcode: "033333",
	GroupId:  "1111",
}

s, _ := p.GetHonorUserInfo(input)
fmt.Println(s)
Output:

func (*Client) GetJobChannel added in v0.1.2

func (c *Client) GetJobChannel(input dto.JobChannelInput) (dto.JobChannelDataRes, error)

GetJobChannel 职务通道

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.GetJobChannel(dto.JobChannelInput{})
fmt.Println(s)
Output:

func (*Client) GetJobSeq added in v0.1.2

func (c *Client) GetJobSeq(input dto.JobSeqInput) (dto.JobSeqDataRes, error)

GetJobSeq 职务序列

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.GetJobSeq(dto.JobSeqInput{})
fmt.Println(s)
Output:

func (*Client) GetJobSub added in v0.1.2

func (c *Client) GetJobSub(input dto.JobSubInput) (dto.JobSubDataRes, error)

GetJobSub 获取子序列

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.GetJobSub(dto.JobSubInput{})
fmt.Println(s)
Output:

func (*Client) GetJobc added in v0.1.2

func (c *Client) GetJobc(input dto.JobcInput) (dto.JobcDataRes, error)

GetJobc 获取职位信息

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.GetJobc(dto.JobcInput{})
fmt.Println(s)
Output:

func (*Client) GetQuitList added in v0.1.2

func (c *Client) GetQuitList(input dto.QuitOrTalInput) (dto.QuitDataRes, error)

GetQuitList 是否被动离职

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.GetQuitList(dto.QuitOrTalInput{})
fmt.Println(s)
Output:

func (*Client) GetRecordJournal added in v0.1.2

func (c *Client) GetRecordJournal(input dto.RecordJournalUserInput) (dto.RecordJournalYachRes, error)

GetRecordJournal 一线 6 小时

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

var input = dto.RecordJournalUserInput{
	AppID:          "1233455",
	ViewerWorkcode: "076533",
	TargetWorkcode: "076533",
	Type:           "lesson",
	Size:           10,
}
s, _ := p.GetRecordJournal(input)
fmt.Println(s)
Output:

func (*Client) GetReportListFrom360 added in v0.1.2

func (c *Client) GetReportListFrom360(workcode string, page int, pageSize int) (dto.Report360DataRes, error)

GetReportListFrom360 获取汇报线 360

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.GetReportListFrom360("076533", 1, 10)
fmt.Println(s)
Output:

func (*Client) GetSecretDeptByUser added in v0.1.2

func (c *Client) GetSecretDeptByUser(input dto.SecretDeptInput) (dto.SecretRes, error)

GetSecretDeptByUser 获取部门

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.GetSecretDeptByUser(dto.SecretDeptInput{})
fmt.Println(s)
Output:

func (*Client) GetTalentOkrUserList added in v0.1.2

func (c *Client) GetTalentOkrUserList(appid string, targetWorkcode string) (dto.OkrUserListRes, error)

GetTalentOkrUserList 获取人才 okr 列表

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)
s, _ := p.GetTalentOkrUserList("123455", "0755555")
fmt.Println(s)
Output:

func (*Client) GetYachWeekReport added in v0.1.2

func (c *Client) GetYachWeekReport(input dto.WeekReportUserInput) (dto.WeekReportYachRes, error)

GetYachWeekReport 获取 yach 周报

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

var input = dto.WeekReportUserInput{
	AppID:          "1111",
	ViewerWorkcode: "076533",
	TargetWorkcode: "076533",
	Size:           0,
}

s, _ := p.GetYachWeekReport(input)
fmt.Println(s)
Output:

func (*Client) RecentSecret added in v0.1.2

func (c *Client) RecentSecret(input dto.SecretInput) (dto.SecretRes, error)

RecentSecret -

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.RecentSecret(dto.SecretInput{})
fmt.Println(s)
Output:

func (*Client) ScheduleCancel added in v0.1.2

func (c *Client) ScheduleCancel(input dto.ScheduleCancelInput) (dto.OpsScheduleGoHrRes, error)

ScheduleCancel 取消日程

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.ScheduleCancel(dto.ScheduleCancelInput{})
fmt.Println(s)
Output:

func (*Client) ScheduleCreate added in v0.1.2

func (c *Client) ScheduleCreate(input dto.ScheduleCreateOrUpdateInput) (dto.OpsScheduleGoHrRes, error)

ScheduleCreate 创建日程

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.ScheduleCreate(dto.ScheduleCreateOrUpdateInput{})
fmt.Println(s)
Output:

func (*Client) ScheduleInvite added in v0.1.2

func (c *Client) ScheduleInvite(input dto.ScheduleInviteInput) (dto.OpsScheduleGoHrRes, error)

ScheduleInvite 加入日程

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.ScheduleInvite(dto.ScheduleInviteInput{})
fmt.Println(s)
Output:

func (*Client) ScheduleList24 added in v0.1.2

func (c *Client) ScheduleList24(input dto.ScheduleLisInput) (dto.OpsScheduleLisRes, error)

ScheduleList24 忙闲

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.ScheduleList24(dto.ScheduleLisInput{})
fmt.Println(s)
Output:

func (*Client) ScheduleUpdate added in v0.1.2

func (c *Client) ScheduleUpdate(input dto.ScheduleCreateOrUpdateInput) (dto.OpsScheduleGoHrRes, error)

ScheduleUpdate 更新日程

Example
conf := dto.AppConf{
	ServiceName: "TEST",
	Token:       "TEST",
}
spiderman, _ := spiderman2.NewSpiderman(conf)

gohrConf := dto.GoHrConf{
	BaseUri: "http://127.0.0.1",
}
p, _ := spiderman.GoHr(gohrConf)

s, _ := p.ScheduleUpdate(dto.ScheduleCreateOrUpdateInput{})
fmt.Println(s)
Output:

type GoHrInterface added in v0.1.2

type GoHrInterface interface {
	GetTalentOkrUserList(appid string, targetWorkcode string) (dto.OkrUserListRes, error)       //GetTalentOkrUserList 获取人才 okr 列表
	GetRecordJournal(input dto.RecordJournalUserInput) (dto.RecordJournalYachRes, error)        //GetRecordJournal 一线 6 小时
	GetHonorUserInfo(input dto.HonorUserInfoInput) (dto.HonorUserInfoRes, error)                //GetHonorUserInfo 荣耀:获取用户详情
	GetYachWeekReport(input dto.WeekReportUserInput) (dto.WeekReportYachRes, error)             //GetYachWeekReport 获取 yach 周报
	GetReportListFrom360(workcode string, page int, pageSize int) (dto.Report360DataRes, error) //GetReportListFrom360 获取汇报线 360

	GetJobChannel(input dto.JobChannelInput) (dto.JobChannelDataRes, error) //GetJobChannel 职务通道
	GetJobc(input dto.JobcInput) (dto.JobcDataRes, error)                   //GetJobc 获取职位信息
	GetJobSeq(input dto.JobSeqInput) (dto.JobSeqDataRes, error)             //GetJobSeq 职务序列
	GetJobSub(input dto.JobSubInput) (dto.JobSubDataRes, error)             //GetJobSub 获取子序列
	GetQuitList(input dto.QuitOrTalInput) (dto.QuitDataRes, error)          //GetQuitList 是否被动离职
	GetFullToTal(input dto.QuitOrTalInput) (dto.TalDataRes, error)          //GetFullToTal 全转专

	ScheduleCreate(input dto.ScheduleCreateOrUpdateInput) (dto.OpsScheduleGoHrRes, error) //ScheduleCreate 创建日程
	ScheduleUpdate(input dto.ScheduleCreateOrUpdateInput) (dto.OpsScheduleGoHrRes, error) //ScheduleUpdate 更新日程
	ScheduleCancel(input dto.ScheduleCancelInput) (dto.OpsScheduleGoHrRes, error)         //ScheduleCancel 取消日程
	ScheduleInvite(input dto.ScheduleInviteInput) (dto.OpsScheduleGoHrRes, error)         //ScheduleInvite 加入日程
	ScheduleList24(input dto.ScheduleLisInput) (dto.OpsScheduleLisRes, error)             //ScheduleList24 忙闲

	GetSecretDeptByUser(input dto.SecretDeptInput) (dto.SecretRes, error) //GetSecretDeptByUser 获取部门
	RecentSecret(input dto.SecretInput) (dto.SecretRes, error)
	BeforeSecret(input dto.SecretInput) (dto.SecretRes, error)
	DecodeSecret(input []map[string]string) (dto.SecretRes, error) //解密
}

func NewGoHrClient

func NewGoHrClient(conf dto.AppConf, GoHrConf dto.GoHrConf) GoHrInterface

Jump to

Keyboard shortcuts

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