aadgraph

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiVersion

type ApiVersion string
const (
	Version16 ApiVersion = "1.6"
	Version20 ApiVersion = "2.0"
)

type ApplicationRef

type ApplicationRef struct {
	AppId                   *string                           `json:"appId,omitempty"`
	AppCategory             *json.RawMessage                  `json:"appCategory"`
	AppContextId            *string                           `json:"appContextId"`
	AppData                 *json.RawMessage                  `json:"appData"`
	AppRoles                *[]msgraph.AppRole                `json:"appRoles,omitempty"`
	AvailableToOtherTenants *bool                             `json:"availableToOtherTenants"`
	DisplayName             *string                           `json:"displayName,omitempty"`
	ErrorUrl                *string                           `json:"errorUrl"`
	Homepage                *string                           `json:"homepage"`
	IdentifierUris          *[]string                         `json:"identifierUris,omitempty"`
	KnownClientApplications *[]string                         `json:"knownClientApplications"`
	LogoutUrl               *string                           `json:"logoutUrl,omitempty"`
	LogoUrl                 *string                           `json:"logoUrl,omitempty"`
	OAuth2Permissions       *[]msgraph.PermissionScope        `json:"oauth2Permissions,omitempty"`
	PublisherDomain         *string                           `json:"publisherDomain,omitempty"`
	PublisherName           *string                           `json:"publisherName,omitempty"`
	PublicClient            *bool                             `json:"publicClient"`
	ReplyUrls               *[]string                         `json:"replyUrls,omitempty"`
	RequiredResourceAccess  *[]msgraph.RequiredResourceAccess `json:"requiredResourceAccess,omitempty"`
	SamlMetadataUrl         *string                           `json:"samlMetadataUrl"`
	SupportsConvergence     *bool                             `json:"supportsConvergence"`
	VerifiedPublisher       *msgraph.VerifiedPublisher        `json:"verifiedPublisher"`
}

type ApplicationRefsClient

type ApplicationRefsClient struct {
	BaseClient Client
}

ApplicationRefsClient performs operations on Applications.

func NewApplicationRefsClient

func NewApplicationRefsClient(tenantId string) *ApplicationRefsClient

NewApplicationRefsClient returns a new ApplicationRefsClient

func (*ApplicationRefsClient) Get

Get retrieves an Application manifest.

type Client

type Client struct {
	// Endpoint is the base endpoint for Azure Active Directory Graph, usually "https://graph.windows.net".
	Endpoint string

	// ApiVersion is the Azure Active Directory Graph API version to use.
	ApiVersion ApiVersion

	// TenantId is the tenant ID to use in requests.
	TenantId string

	// UserAgent is the HTTP user agent string to send in requests.
	UserAgent string

	// Authorizer is anything that can provide an access token with which to authorize requests.
	Authorizer auth.Authorizer
	// contains filtered or unexported fields
}

Client is a base client to be used by clients for specific entities. It can send GET, POST, PUT, PATCH and DELETE requests to Azure Active Directory Graph and is API version and tenant aware.

func NewClient

func NewClient(apiVersion ApiVersion, tenantId string) Client

NewClient returns a new Client configured with the specified API version and tenant ID.

func (Client) Delete

Delete performs a DELETE request.

func (Client) Get

Get performs a GET request.

func (Client) Patch

Patch performs a PATCH request.

func (Client) Post

Post performs a POST request.

func (Client) Put

Put performs a PUT request.

type DeleteHttpRequestInput

type DeleteHttpRequestInput struct {
	ValidStatusCodes []int
	ValidStatusFunc  ValidStatusFunc
	Uri              Uri
}

DeleteHttpRequestInput configures a DELETE request.

func (DeleteHttpRequestInput) GetValidStatusCodes

func (i DeleteHttpRequestInput) GetValidStatusCodes() []int

GetValidStatusCodes returns a []int of status codes considered valid for a DELETE request.

func (DeleteHttpRequestInput) GetValidStatusFunc

func (i DeleteHttpRequestInput) GetValidStatusFunc() ValidStatusFunc

GetValidStatusFunc returns a function used to evaluate whether the response to a DELETE request is considered valid.

type GetHttpRequestInput

type GetHttpRequestInput struct {
	DisablePaging    bool
	ValidStatusCodes []int
	ValidStatusFunc  ValidStatusFunc
	Uri              Uri
	// contains filtered or unexported fields
}

GetHttpRequestInput configures a GET request.

func (GetHttpRequestInput) GetValidStatusCodes

func (i GetHttpRequestInput) GetValidStatusCodes() []int

GetValidStatusCodes returns a []int of status codes considered valid for a GET request.

func (GetHttpRequestInput) GetValidStatusFunc

func (i GetHttpRequestInput) GetValidStatusFunc() ValidStatusFunc

GetValidStatusFunc returns a function used to evaluate whether the response to a GET request is considered valid.

type GraphClient

type GraphClient = *http.Client

GraphClient is any suitable HTTP client.

type HttpRequestInput

type HttpRequestInput interface {
	GetValidStatusCodes() []int
	GetValidStatusFunc() ValidStatusFunc
}

HttpRequestInput is any type that can validate the response to an HTTP request.

type PatchHttpRequestInput

type PatchHttpRequestInput struct {
	Body             []byte
	ValidStatusCodes []int
	ValidStatusFunc  ValidStatusFunc
	Uri              Uri
}

PatchHttpRequestInput configures a PATCH request.

func (PatchHttpRequestInput) GetValidStatusCodes

func (i PatchHttpRequestInput) GetValidStatusCodes() []int

GetValidStatusCodes returns a []int of status codes considered valid for a PATCH request.

func (PatchHttpRequestInput) GetValidStatusFunc

func (i PatchHttpRequestInput) GetValidStatusFunc() ValidStatusFunc

GetValidStatusFunc returns a function used to evaluate whether the response to a PATCH request is considered valid.

type PostHttpRequestInput

type PostHttpRequestInput struct {
	Body             []byte
	ValidStatusCodes []int
	ValidStatusFunc  ValidStatusFunc
	Uri              Uri
}

PostHttpRequestInput configures a POST request.

func (PostHttpRequestInput) GetValidStatusCodes

func (i PostHttpRequestInput) GetValidStatusCodes() []int

GetValidStatusCodes returns a []int of status codes considered valid for a POST request.

func (PostHttpRequestInput) GetValidStatusFunc

func (i PostHttpRequestInput) GetValidStatusFunc() ValidStatusFunc

GetValidStatusFunc returns a function used to evaluate whether the response to a POST request is considered valid.

type PutHttpRequestInput

type PutHttpRequestInput struct {
	Body             []byte
	ValidStatusCodes []int
	ValidStatusFunc  ValidStatusFunc
	Uri              Uri
}

PutHttpRequestInput configures a PUT request.

func (PutHttpRequestInput) GetValidStatusCodes

func (i PutHttpRequestInput) GetValidStatusCodes() []int

GetValidStatusCodes returns a []int of status codes considered valid for a PUT request.

func (PutHttpRequestInput) GetValidStatusFunc

func (i PutHttpRequestInput) GetValidStatusFunc() ValidStatusFunc

GetValidStatusFunc returns a function used to evaluate whether the response to a PUT request is considered valid.

type Uri

type Uri struct {
	Entity string
	Params url.Values
}

Uri represents an Azure Active Directory Graph endpoint.

type ValidStatusFunc

type ValidStatusFunc func(response *http.Response, o *odata.OData) bool

ValidStatusFunc is a function that tests whether an HTTP response is considered valid for the particular request.

Jump to

Keyboard shortcuts

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