policy

package
v4.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRules

type AddRules struct {
	PolicyName  string
	ActionAlias string
	RuleNames   []string
}

func (AddRules) GetBody

func (r AddRules) GetBody() (body map[string]interface{})

func (AddRules) GetMethod

func (r AddRules) GetMethod() string

func (AddRules) GetPath

func (r AddRules) GetPath() string

func (AddRules) GetQueries

func (r AddRules) GetQueries() map[string][]string

type Client

type Client struct {
	A permify.API
}

func (*Client) AddRules

func (client *Client) AddRules(rules AddRules) (*permify.MessageResponse, error)

func (*Client) Create

func (client *Client) Create(createPolicyParams Create) (*Response, error)

func (*Client) CreateWithAssociations

func (client *Client) CreateWithAssociations(createWithAssociationsPolicyParams CreateWithAssociations) (*Response, error)

func (*Client) Delete

func (client *Client) Delete(policyName string) (*Response, error)

func (*Client) Get

func (client *Client) Get(policyName string) (*Response, error)

func (*Client) List

func (client *Client) List(listPolicyParams List) (*MultipleResponseWithPagination, error)

func (*Client) RemoveOptions

func (client *Client) RemoveOptions(rules RemoveRules) (*permify.MessageResponse, error)

type Create

type Create struct {
	Name        string
	ActionAlias string
	AnyOf       bool
	Description string
	RuleNames   []string
}

func (Create) GetBody

func (r Create) GetBody() (body map[string]interface{})

func (Create) GetMethod

func (r Create) GetMethod() string

func (Create) GetPath

func (r Create) GetPath() string

func (Create) GetQueries

func (r Create) GetQueries() map[string][]string

type CreateWithAssociations

type CreateWithAssociations struct {
	Name        string
	ActionAlias string
	AnyOf       bool
	Description string
	Rules       []struct {
		Name        string
		Description string
		Condition   string
		FailMessage string
	}
}

func (CreateWithAssociations) GetBody

func (r CreateWithAssociations) GetBody() (body map[string]interface{})

func (CreateWithAssociations) GetMethod

func (r CreateWithAssociations) GetMethod() string

func (CreateWithAssociations) GetPath

func (r CreateWithAssociations) GetPath() string

func (CreateWithAssociations) GetQueries

func (r CreateWithAssociations) GetQueries() map[string][]string

type Delete

type Delete struct {
	Name        string
	ActionAlias string
}

func (Delete) GetBody

func (r Delete) GetBody() map[string]interface{}

func (Delete) GetMethod

func (r Delete) GetMethod() string

func (Delete) GetPath

func (r Delete) GetPath() string

func (Delete) GetQueries

func (r Delete) GetQueries() map[string][]string

type List

type List struct {
	Page    string
	Limit   string
	OrderBy string
	SortBy  string
}

func (List) GetBody

func (r List) GetBody() map[string]interface{}

func (List) GetMethod

func (r List) GetMethod() string

func (List) GetPath

func (r List) GetPath() string

func (List) GetQueries

func (r List) GetQueries() map[string][]string

type MultipleResponseWithPagination

type MultipleResponseWithPagination struct {
	Data struct {
		TotalRecord int64            `json:"total_record"`
		Records     []permify.Policy `json:"records"`
		Limit       int              `json:"limit"`
		Page        int              `json:"page"`
	} `json:"data"`
}

type RemoveRules

type RemoveRules struct {
	PolicyName  string
	ActionAlias string
	RuleNames   []string
}

func (RemoveRules) GetBody

func (r RemoveRules) GetBody() (body map[string]interface{})

func (RemoveRules) GetMethod

func (r RemoveRules) GetMethod() string

func (RemoveRules) GetPath

func (r RemoveRules) GetPath() string

func (RemoveRules) GetQueries

func (r RemoveRules) GetQueries() map[string][]string

type Response

type Response struct {
	Data permify.Policy `json:"data"`
}

type Show

type Show struct {
	Name        string
	ActionAlias string
}

func (Show) GetBody

func (r Show) GetBody() map[string]interface{}

func (Show) GetMethod

func (r Show) GetMethod() string

func (Show) GetPath

func (r Show) GetPath() string

func (Show) GetQueries

func (r Show) GetQueries() map[string][]string

Jump to

Keyboard shortcuts

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