Documentation ¶
Index ¶
- Constants
- func WithBearerToken(token string) uhttp.RequestOption
- type Client
- func (c *Client) Authorize(ctx context.Context, authUrlPath string, clientId string, clientSecret string, ...) error
- func (c *Client) ListResourcePermissions(ctx context.Context, resourceId string, pToken *pagination.Token) (*ResourcePermissions, string, error)
- func (c *Client) ListResources(ctx context.Context, pToken *pagination.Token) (*ResourceResponse, string, error)
- func (c *Client) ListUsersWithAccessToResources(ctx context.Context, pToken *pagination.Token) (*UsersWithAccessQueryResponse, string, error)
- type Emails
- type GrantedEntity
- type PageInfo
- type ResourcePermissions
- type ResourceResponse
- type UsersWithAccessQueryResponse
Constants ¶
View Source
const DefaultEndCursor = "{{endCursor}}"
View Source
const DefaultPageSize = 500
View Source
const ListUsersResourceTypeResourceID = "resourceID"
View Source
const ListUsersResourceTypeResourceTag = "resourceTag"
Variables ¶
This section is empty.
Functions ¶
func WithBearerToken ¶
func WithBearerToken(token string) uhttp.RequestOption
Types ¶
type Client ¶
type Client struct { BearerToken string BaseUrl *url.URL // contains filtered or unexported fields }
func (*Client) ListResourcePermissions ¶
func (c *Client) ListResourcePermissions(ctx context.Context, resourceId string, pToken *pagination.Token) (*ResourcePermissions, string, error)
func (*Client) ListResources ¶
func (c *Client) ListResources(ctx context.Context, pToken *pagination.Token) (*ResourceResponse, string, error)
func (*Client) ListUsersWithAccessToResources ¶
func (c *Client) ListUsersWithAccessToResources(ctx context.Context, pToken *pagination.Token) (*UsersWithAccessQueryResponse, string, error)
type Emails ¶
type Emails []string
func (*Emails) UnmarshalJSON ¶
Emails can be a single string or string array.
type GrantedEntity ¶
type GrantedEntity struct { Id string `json:"id"` Name string `json:"name"` Type string `json:"type"` Properties struct { VertexID string `json:"_vertexID"` Email string `json:"email"` Emails Emails `json:"emails,omitempty"` Name string `json:"name"` NativeType string `json:"nativeType"` PrimaryEmail string `json:"primaryEmail"` Enabled *bool `json:"accountEnabled"` ExternalId string `json:"externalId"` } `json:"properties"` }
type ResourcePermissions ¶
type ResourcePermissions struct { Data struct { EntityEffectiveAccessEntries struct { Nodes []struct { GrantedEntity *GrantedEntity `json:"grantedEntity"` AccessTypes []string `json:"accessTypes"` } `json:"nodes"` PageInfo PageInfo `json:"pageInfo"` } `json:"entityEffectiveAccessEntries"` } `json:"data"` }
type ResourceResponse ¶
type UsersWithAccessQueryResponse ¶
type UsersWithAccessQueryResponse struct { Data struct { EntityEffectiveAccessEntries struct { Nodes []struct { GrantedEntity *GrantedEntity `json:"grantedEntity"` } `json:"nodes"` PageInfo PageInfo `json:"pageInfo"` } `json:"entityEffectiveAccessEntries"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.