Documentation ¶
Index ¶
- type ApiVersion
- type ApplicationRef
- type ApplicationRefsClient
- type Client
- func (c Client) Delete(ctx context.Context, input DeleteHttpRequestInput) (*http.Response, int, *odata.OData, error)
- func (c Client) Get(ctx context.Context, input GetHttpRequestInput) (*http.Response, int, *odata.OData, error)
- func (c Client) Patch(ctx context.Context, input PatchHttpRequestInput) (*http.Response, int, *odata.OData, error)
- func (c Client) Post(ctx context.Context, input PostHttpRequestInput) (*http.Response, int, *odata.OData, error)
- func (c Client) Put(ctx context.Context, input PutHttpRequestInput) (*http.Response, int, *odata.OData, error)
- type DeleteHttpRequestInput
- type GetHttpRequestInput
- type GraphClient
- type HttpRequestInput
- type PatchHttpRequestInput
- type PostHttpRequestInput
- type PutHttpRequestInput
- type Uri
- type ValidStatusFunc
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 ¶
func (c *ApplicationRefsClient) Get(ctx context.Context, appId string) (*ApplicationRef, int, error)
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 ¶
func (c Client) Delete(ctx context.Context, input DeleteHttpRequestInput) (*http.Response, int, *odata.OData, error)
Delete performs a DELETE request.
func (Client) Get ¶
func (c Client) Get(ctx context.Context, input GetHttpRequestInput) (*http.Response, int, *odata.OData, error)
Get performs a GET request.
func (Client) Patch ¶
func (c Client) Patch(ctx context.Context, input PatchHttpRequestInput) (*http.Response, int, *odata.OData, error)
Patch performs a PATCH 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 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.