pritunl

package
v0.0.0-...-d9ac2dc Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Host         string
	Token        string
	Secret       string
	Organization string
	// contains filtered or unexported fields
}

func New

func New(host, token, secret, organization string) *Client

func (*Client) ActivateUser

func (c *Client) ActivateUser(email, orgId string) error

func (*Client) CreateUser

func (c *Client) CreateUser(login, email, orgId string) error

func (*Client) CreateUserInDefaultOrg

func (c *Client) CreateUserInDefaultOrg(login, email string) error

func (*Client) DeactivateUser

func (c *Client) DeactivateUser(email, orgId string) error

func (*Client) DeleteUser

func (c *Client) DeleteUser(id, orgId string) error

func (*Client) DeleteUserFromDefaultOrg

func (c *Client) DeleteUserFromDefaultOrg(email string) error

func (*Client) GetOrganization

func (c *Client) GetOrganization() (org Organization, err error)

func (*Client) GetUserByEmail

func (c *Client) GetUserByEmail(email string, orgId string) (user User, err error)

func (*Client) GetUserByName

func (c *Client) GetUserByName(name string, orgId string) (user User, err error)

func (*Client) GetUserKeyZipUrl

func (c *Client) GetUserKeyZipUrl(email string) (url string, err error)

func (*Client) GetUserKeys

func (c *Client) GetUserKeys(userId, orgId string) (key Key, err error)

func (*Client) UpdateUser

func (c *Client) UpdateUser(id, orgId string, userInfo *User) error

type Key

type Key struct {
	ID        string `json:"id"`
	KeyURL    string `json:"key_url"`
	KeyZipURL string `json:"key_zip_url"`
	KeyOncURL string `json:"key_onc_url"`
	ViewURL   string `json:"view_url"`
	URIURL    string `json:"uri_url"`
}

type Organization

type Organization struct {
	ID         string      `json:"id"`
	Name       string      `json:"name"`
	AuthAPI    bool        `json:"auth_api"`
	AuthToken  interface{} `json:"auth_token"`
	AuthSecret interface{} `json:"auth_secret"`
	UserCount  int         `json:"user_count"`
}

type User

type User struct {
	ID               string `json:"id"`
	Organization     string `json:"organization"`
	OrganizationName string `json:"organization_name"`
	Name             string `json:"name"`
	Email            string `json:"email"`
	Disabled         bool   `json:"disabled"`
}

Jump to

Keyboard shortcuts

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