client

package
v0.0.0-...-4c43777 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckPermissionInput

type CheckPermissionInput struct {
	Service  string `json:"service"`
	Resource string `json:"resource"`
	Action   string `json:"action"`
}

type CheckPermissionResponse

type CheckPermissionResponse struct {
	Data struct {
		CheckPermission struct {
			Allowed bool `json:"allowed"`
		} `json:"checkPermission"`
	} `json:"data"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(dashboardURL string) *Client

func (*Client) CheckPermission

func (c *Client) CheckPermission(ctx context.Context, authInfo *appx.AuthInfo, input CheckPermissionInput) (bool, error)

type GraphQLQuery

type GraphQLQuery struct {
	Query     string      `json:"query"`
	Variables interface{} `json:"variables"`
}

type PermissionChecker

type PermissionChecker struct {
	Service      string
	DashboardURL string
}

func NewPermissionChecker

func NewPermissionChecker(service string, dashboardURL string) *PermissionChecker

func (*PermissionChecker) CheckPermission

func (p *PermissionChecker) CheckPermission(ctx context.Context, authInfo *appx.AuthInfo, resource string, action string) (bool, error)

Jump to

Keyboard shortcuts

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