apiclient

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JUMPCLOUD_API_BASE_URL = "https://console.jumpcloud.com/api"
	CONTENT_TYPE           = "application/json"
	SUBSYSTEM_NAME         = "apiclient.Client"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ApiKey string

	ProviderVersion string
	Context         context.Context
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, apikey string, providerVersion string) Client

func (*Client) CallApiWithBody

func (c *Client) CallApiWithBody(method string, group *UserGroup) (payload UserGroup, response *http.Response, err error)

func (*Client) CallApiWithID

func (c *Client) CallApiWithID(method string, id string) (payload UserGroup, response *http.Response, err error)

func (*Client) CreateUserGroup

func (c *Client) CreateUserGroup(create *UserGroup) (UserGroup, *http.Response, error)

func (*Client) DeleteUserGroup

func (c *Client) DeleteUserGroup(id string) (*http.Response, error)

func (*Client) GetUserGroupDetails

func (c *Client) GetUserGroupDetails(id string) (UserGroup, *http.Response, error)

func (*Client) ReadBody

func (c *Client) ReadBody(r io.Reader) string

func (*Client) ReusableReader

func (c *Client) ReusableReader(r io.Reader) io.Reader

func (*Client) UpdateUserGroup

func (c *Client) UpdateUserGroup(update *UserGroup) (UserGroup, *http.Response, error)

type LdapGroup

type LdapGroup struct {
	Name string `json:"name,omitempty"`
}

type PosixGroup

type PosixGroup struct {
	Id   int64  `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type QueryFilter

type QueryFilter struct {
	Field    string `json:"field,omitempty"`
	Operator string `json:"operator,omitempty"`
	Value    string `json:"value,omitempty"`
}

type RadiusReply

type RadiusReply struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type UserGroup

type UserGroup struct {
	Attributes              *UserGroupAttributes             `json:"attributes,omitempty"`
	Description             string                           `json:"description,omitempty"`
	Email                   string                           `json:"email,omitempty"`
	Id                      string                           `json:"id"`
	MemberQuery             *UserGroupMemberQuery            `json:"memberQuery,omitempty"`
	MemberQueryExceptions   []UserGroupMemberQueryExceptions `json:"memberQueryExceptions,omitempty"`
	MemberSuggestionsNotify bool                             `json:"memberSuggestionsNotify,omitempty"`
	MembershipAutomated     bool                             `json:"membershipAutomated,omitempty"`
	Name                    string                           `json:"name"`
	SuggestionCounts        *UserGroupMemberSuggestionCounts `json:"suggestionCounts,omitempty"`
	Type                    string                           `json:"type,omitempty"`
}

type UserGroupAttributes

type UserGroupAttributes struct {
	Sudo         *UserGroupSudoConfig   `json:"sudo,omitempty"`
	LdapGroups   []LdapGroup            `json:"ldapGroups,omitempty"`
	PosixGroups  []PosixGroup           `json:"posixGroups,omitempty"`
	Radius       *UserGroupRadiusConfig `json:"radius,omitempty"`
	SambaEnabled bool                   `json:"sambaEnabled,omitempty"`
}

type UserGroupMemberQuery

type UserGroupMemberQuery struct {
	QueryType string        `json:"queryType,omitempty"`
	Filters   []QueryFilter `json:"filters,omitempty"`
}

type UserGroupMemberQueryExceptions

type UserGroupMemberQueryExceptions struct {
	Attributes []interface{} `json:"attributes,omitempty"`
	Id         string        `json:"id,omitempty"`
	Type       string        `json:"type,omitempty"`
}

type UserGroupMemberSuggestionCounts

type UserGroupMemberSuggestionCounts struct {
	Add    int64 `json:"add,omitempty"`
	Remove int64 `json:"remove,omitempty"`
	Total  int64 `json:"total,omitempty"`
}

type UserGroupRadiusConfig

type UserGroupRadiusConfig struct {
	Reply []RadiusReply `json:"reply,omitempty"`
}

type UserGroupSudoConfig

type UserGroupSudoConfig struct {
	Enabled         bool `json:"enabled,omitempty"`
	WithoutPassword bool `json:"withoutPassword,omitempty"`
}

Jump to

Keyboard shortcuts

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