user

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 AddGroups

type AddGroups struct {
	ID       string
	GroupIDs []string
}

func (AddGroups) GetBody

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

func (AddGroups) GetMethod

func (r AddGroups) GetMethod() string

func (AddGroups) GetPath

func (r AddGroups) GetPath() string

func (AddGroups) GetQueries

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

type AddRoles

type AddRoles struct {
	ID        string
	RoleNames []string
}

func (AddRoles) GetBody

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

func (AddRoles) GetMethod

func (r AddRoles) GetMethod() string

func (AddRoles) GetPath

func (r AddRoles) GetPath() string

func (AddRoles) GetQueries

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

type Client

type Client struct {
	A permify.API
}

func (*Client) AddGroups

func (client *Client) AddGroups(groups AddGroups) (*permify.MessageResponse, error)

func (*Client) AddRoles

func (client *Client) AddRoles(roles AddRoles) (*permify.MessageResponse, error)

func (*Client) Create

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

func (*Client) Delete

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

func (*Client) Get

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

func (*Client) IsAuthorized

func (client *Client) IsAuthorized(authorized IsAuthorized) (*IsAuthorizedResponse, error)

func (*Client) List

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

func (*Client) RemoveGroups

func (client *Client) RemoveGroups(groups RemoveGroups) (*permify.MessageResponse, error)

func (*Client) RemoveRoles

func (client *Client) RemoveRoles(roles RemoveRoles) (*permify.MessageResponse, error)

func (*Client) Update

func (client *Client) Update(updateUserParams Update) (*Response, error)

type Create

type Create struct {
	ID         string
	Name       string
	Photo      string
	RoleNames  []string
	GroupIDs   []string
	Attributes map[string]interface{}
}

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 Delete

type Delete struct {
	ID 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 IsAuthorized

type IsAuthorized struct {
	PolicyName    string
	ActionAlias   string
	UserID        string
	CascadeCreate bool
	ResourceID    *string
	ResourceType  *string
	Environment   *map[string]interface{}
}

func (IsAuthorized) GetBody

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

func (IsAuthorized) GetMethod

func (r IsAuthorized) GetMethod() string

func (IsAuthorized) GetPath

func (r IsAuthorized) GetPath() string

func (IsAuthorized) GetQueries

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

type IsAuthorizedResponse

type IsAuthorizedResponse struct {
	Data struct {
		Allow   bool        `json:"allow"`
		Details interface{} `json:"details"`
	} `json:"data"`
}

type List

type List struct {
	GroupIDs []string
	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.User `json:"records"`
		Limit       int            `json:"limit"`
		Page        int            `json:"page"`
	} `json:"data"`
}

type RemoveGroups

type RemoveGroups struct {
	ID       string
	GroupIDs []string
}

func (RemoveGroups) GetBody

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

func (RemoveGroups) GetMethod

func (r RemoveGroups) GetMethod() string

func (RemoveGroups) GetPath

func (r RemoveGroups) GetPath() string

func (RemoveGroups) GetQueries

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

type RemoveRoles

type RemoveRoles struct {
	ID        string
	RoleNames []string
}

func (RemoveRoles) GetBody

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

func (RemoveRoles) GetMethod

func (r RemoveRoles) GetMethod() string

func (RemoveRoles) GetPath

func (r RemoveRoles) GetPath() string

func (RemoveRoles) GetQueries

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

type Response

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

type Show

type Show struct {
	ID 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

type Update

type Update struct {
	ID         string
	Name       *string
	Photo      *string
	Attributes *map[string]interface{}
}

func (Update) GetBody

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

func (Update) GetMethod

func (r Update) GetMethod() string

func (Update) GetPath

func (r Update) GetPath() string

func (Update) GetQueries

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

Jump to

Keyboard shortcuts

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