MCPcopy Index your code
hub / github.com/coder/coder / UserSkills

Method UserSkills

codersdk/userskills.go:68–79  ·  view source on GitHub ↗

UserSkills lists user skill metadata for the specified user.

(ctx context.Context, user string)

Source from the content-addressed store, hash-verified

66
67// UserSkills lists user skill metadata for the specified user.
68func (c *ExperimentalClient) UserSkills(ctx context.Context, user string) ([]UserSkillMetadata, error) {
69 res, err := c.Request(ctx, http.MethodGet, userSkillsPath(user), nil)
70 if err != nil {
71 return nil, err
72 }
73 defer res.Body.Close()
74 if res.StatusCode != http.StatusOK {
75 return nil, ReadBodyAsError(res)
76 }
77 var skills []UserSkillMetadata
78 return skills, json.NewDecoder(res.Body).Decode(&skills)
79}
80
81// UserSkillByName returns a user skill by name.
82func (c *ExperimentalClient) UserSkillByName(ctx context.Context, user string, name string) (UserSkill, error) {

Callers 4

TestUserSkillsCRUDFunction · 0.95
TestUserSkillAuditFunction · 0.95

Calls 4

ReadBodyAsErrorFunction · 0.85
userSkillsPathFunction · 0.70
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 4

TestUserSkillsCRUDFunction · 0.76
TestUserSkillAuditFunction · 0.76