Version: v0.0.0-...-4c71261 Latest Latest

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 7 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Client

type Client struct {
	// contains filtered or unexported fields

Client struct

func NewClient

func NewClient(username string, password string, url *string) *Client

NewClient constructor

func (*Client) GetGroup

func (c *Client) GetGroup(groupSlug string) (*Group, error)

GetGroup from CRI

func (*Client) SearchUser

func (c *Client) SearchUser(email string) (*ProfileResult, error)

SearchUser in CRI

type Group

type Group struct {
	Detail     string        `json:"detail"`
	URL        string        `json:"url"`
	Slug       string        `json:"slug"`
	Gid        int           `json:"gid"`
	Name       string        `json:"name"`
	Kind       string        `json:"kind"`
	MembersURL string        `json:"members_url"`
	HistoryURL string        `json:"history_url"`
	Managers   []interface{} `json:"managers"`
	Private    bool          `json:"private"`

Group struct

type ProfileResult

type ProfileResult struct {
	URL          string `json:"url"`
	Login        string `json:"login"`
	UID          int    `json:"uid"`
	PrimaryGroup struct {
		URL  string `json:"url"`
		Slug string `json:"slug"`
	} `json:"primary_group"`
	FirstName     string `json:"first_name"`
	LastName      string `json:"last_name"`
	Email         string `json:"email"`
	GroupsHistory []struct {
		Group struct {
			URL  string `json:"url"`
			Slug string `json:"slug"`
		} `json:"group"`
		BeginAt        string `json:"begin_at"`
		EndAt          string `json:"end_at"`
		GraduationYear int    `json:"graduation_year"`
		IsCurrent      bool   `json:"is_current"`
	} `json:"groups_history"`
	CurrentGroups []struct {
		URL  string `json:"url"`
		Slug string `json:"slug"`
	} `json:"current_groups"`
	OldAccounts []interface{} `json:"old_accounts"`
	NewAccount  interface{}   `json:"new_account"`

type ProfileSearchReq

type ProfileSearchReq struct {
	Detail   string          `json:"detail"`
	Count    int             `json:"count"`
	Next     interface{}     `json:"next"`
	Previous interface{}     `json:"previous"`
	Results  []ProfileResult `json:"results"`

Jump to

Keyboard shortcuts

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