provider

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Time out requests after 10 seconds
	ClientTimeout int = 10
)

Variables

This section is empty.

Functions

func New

func New(version string) func() *schema.Provider

Types

type APIClient

type APIClient struct {
	BaseURL *url.URL
	Token   string

	UserAgent string
	// contains filtered or unexported fields
}

func NewClient added in v0.2.0

func NewClient(endpoint string, token string, UserAgent string) (*APIClient, error)

func (*APIClient) AddGroupMember

func (c *APIClient) AddGroupMember(group_id string, user_id string) (*http.Response, error)

func (*APIClient) CreateGroup

func (c *APIClient) CreateGroup(group *Group) (*Group, *http.Response, error)

func (*APIClient) CreateUser added in v0.3.0

func (c *APIClient) CreateUser(user *User) (*User, *http.Response, error)

func (*APIClient) DeleteGroup

func (c *APIClient) DeleteGroup(id string) (*http.Response, error)

func (*APIClient) DeleteUser added in v0.3.0

func (c *APIClient) DeleteUser(id string) (*http.Response, error)

func (*APIClient) FindGroupByDisplayname

func (c *APIClient) FindGroupByDisplayname(displayname string) (*Group, *http.Response, error)

func (*APIClient) FindUserByUsername

func (c *APIClient) FindUserByUsername(username string) (*User, *http.Response, error)

func (*APIClient) ListUsers

func (c *APIClient) ListUsers() (*[]User, *http.Response, error)

func (*APIClient) PatchGroup added in v0.8.0

func (c *APIClient) PatchGroup(opmsg *OperationMessage, id string) (*Group, *http.Response, error)

func (*APIClient) PatchUser added in v0.3.0

func (c *APIClient) PatchUser(opmsg *OperationMessage, id string) (*User, *http.Response, error)

func (*APIClient) PutUser added in v0.3.0

func (c *APIClient) PutUser(user *User, id string) (*User, *http.Response, error)

func (*APIClient) ReadGroup

func (c *APIClient) ReadGroup(id string) (*Group, *http.Response, error)

func (*APIClient) ReadUser added in v0.3.0

func (c *APIClient) ReadUser(id string) (*User, *http.Response, error)

func (*APIClient) RemoveGroupMember

func (c *APIClient) RemoveGroupMember(group_id string, user_id string) (*http.Response, error)

func (*APIClient) TestGroupMember

func (c *APIClient) TestGroupMember(group_id string, user_id string) (bool, *http.Response, error)

type Address

type Address struct {
	Formatted     string `json:"formatted,omitempty"`
	StreetAddress string `json:"streetAddress,omitempty"`
	Locality      string `json:"locality,omitempty"`
	Region        string `json:"region,omitempty"`
	PostalCode    string `json:"postalCode,omitempty"`
	Country       string `json:"country,omitempty"`
}

type Email

type Email struct {
	Value   string `json:"value"`
	Type    string `json:"type,omitempty"`
	Primary bool   `json:"primary"`
}

type EnterpriseUser

type EnterpriseUser struct {
	EmployeeNumber string  `json:"employeeNumber"`
	CostCenter     string  `json:"costCenter"`
	Organization   string  `json:"organization"`
	Division       string  `json:"division"`
	Department     string  `json:"department"`
	Manager        Manager `json:"manager"`
}

type Group

type Group struct {
	Meta        Meta     `json:"meta,omitempty"`
	ID          string   `json:"id"`
	ExternalID  string   `json:"externalId,omitempty"`
	DisplayName string   `json:"displayName"`
	Members     []Member `json:"members,omitempty"`
}

type GroupListResponse

type GroupListResponse struct {
	TotalResults int      `json:"totalResults"`
	StartIndex   int      `json:"startIndex,omitempty"`
	ItemsPerPage int      `json:"itemsPerPage,omitempty"`
	Resources    []Group  `json:"Resources,omitempty"`
	Schemas      []string `json:"schemas"`
}

type Manager

type Manager struct {
	Value string `json:"value"`
	Ref   string `json:"$ref,omitempty"`
}

type Member

type Member struct {
	Value string `json:"value"`
	Ref   string `json:"$ref,omitempty"`
}

type Meta

type Meta struct {
	ResourceType string    `json:"resourceType"`
	Created      time.Time `json:"created"`
	LastModified time.Time `json:"lastModified"`
	Location     string    `json:"location,omitempty"`
	Version      string    `json:"version,omitempty"`
}

type Name

type Name struct {
	Formatted       string `json:"formatted,omitempty"`
	FamilyName      string `json:"familyName,omitempty"`
	GivenName       string `json:"givenName,omitempty"`
	MiddleName      string `json:"middleName,omitempty"`
	HonorificPrefix string `json:"honorificPrefix,omitempty"`
	HonorificSuffix string `json:"honorificSuffix,omitempty"`
}

type Operation

type Operation struct {
	Operation string      `json:"op"`
	Value     interface{} `json:"value"`
	Path      string      `json:"path,omitempty"`
}

type OperationMessage

type OperationMessage struct {
	Schemas    []string    `json:"schemas"`
	Operations []Operation `json:"Operations"`
}

type PhoneNumber

type PhoneNumber struct {
	Value string `json:"value"`
	Type  string `json:"type"`
}

type RLHttpClient added in v0.2.0

type RLHttpClient struct {
	RateLimiter *rate.Limiter
	// contains filtered or unexported fields
}

func (*RLHttpClient) Do added in v0.2.0

func (c *RLHttpClient) Do(req *http.Request) (*http.Response, error)

type User

type User struct {
	Meta              Meta            `json:"meta,omitempty"`
	ID                string          `json:"id"`
	ExternalID        string          `json:"externalId,omitempty"`
	UserName          string          `json:"userName"`
	Name              Name            `json:"name,omitempty"`
	DisplayName       string          `json:"displayName,omitempty"`
	NickName          string          `json:"nickName,omitempty"`
	ProfileURL        string          `json:"profileUrl,omitempty"`
	Title             string          `json:"title,omitempty"`
	UserType          string          `json:"userType,omitempty"`
	PreferredLanguage string          `json:"preferredLanguage,omitempty"`
	Locale            string          `json:"locale,omitempty"`
	Timezone          string          `json:"timezone,omitempty"`
	Active            bool            `json:"active,omitempty"`
	Emails            []Email         `json:"emails,omitempty"`
	PhoneNumbers      []PhoneNumber   `json:"phoneNumbers,omitempty"`
	Addresses         []Address       `json:"addresses,omitempty"`
	EnterpriseUser    *EnterpriseUser `json:"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User,omitempty"`
	Schemas           []string        `json:"schemas"`
	Roles             []string        `json:"roles,omitempty"`
	Groups            []string        `json:"groups,omitempty"`
}

type UserListResponse

type UserListResponse struct {
	TotalResults int      `json:"totalResults"`
	StartIndex   int      `json:"startIndex,omitempty"`
	ItemsPerPage int      `json:"itemsPerPage,omitempty"`
	Resources    []User   `json:"Resources,omitempty"`
	Schemas      []string `json:"schemas"`
}

Jump to

Keyboard shortcuts

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