Documentation ¶
Index ¶
- type Application
- type ApplicationCreateRequest
- type ApplicationSearchParams
- type ApplicationUpdateRequest
- type Assignment
- type AssignmentRequest
- type Client
- func (c *Client) AddPermissionsToRole(role string, createRequest *[]string) (*[]string, error)
- func (c *Client) AddUsersToGroup(group string, createRequest *[]string) (*[]string, error)
- func (c *Client) CreateApplication(createRequest *ApplicationCreateRequest) (*Application, error)
- func (c *Client) CreateAssignments(createRequest *[]AssignmentRequest) (*[]AssignmentRequest, error)
- func (c *Client) CreateGroup(createRequest *GroupCreateRequest) (*Group, error)
- func (c *Client) CreateOidcApplication(createRequest *OidcApplicationCreateRequest) (*OidcApplication, error)
- func (c *Client) CreateOidcProvider(createRequest *OidcProviderCreateRequest) (*OidcProvider, error)
- func (c *Client) CreatePasswordCredential(createRequest *PasswordCredentialCreateRequest) (*PasswordCredential, error)
- func (c *Client) CreatePermission(createRequest *PermissionCreateRequest) (*Permission, error)
- func (c *Client) CreateRealm(applicationName string, createRequest *RealmCreateRequest) (*Realm, error)
- func (c *Client) CreateRole(createRequest *RoleCreateRequest) (*Role, error)
- func (c *Client) CreateUser(createRequest *UserCreateRequest) (*User, error)
- func (c *Client) DeleteApplication(name string) error
- func (c *Client) DeleteAssignments(deleteRequest *[]AssignmentRequest) error
- func (c *Client) DeleteGroup(name string) error
- func (c *Client) DeleteOidcApplication(name string) error
- func (c *Client) DeleteOidcProvider(name string) error
- func (c *Client) DeletePasswordCredential() error
- func (c *Client) DeletePermission(name string) error
- func (c *Client) DeleteRealm(applicationName string, name string) error
- func (c *Client) DeleteRole(name string) error
- func (c *Client) DeleteUser(name string) error
- func (c *Client) FindApplication(name string) (*Application, error)
- func (c *Client) FindAssignment(findRequest *AssignmentRequest) (*Assignment, error)
- func (c *Client) FindGroup(name string) (*Group, error)
- func (c *Client) FindOidcApplication(name string) (*OidcApplication, error)
- func (c *Client) FindOidcProvider(name string) (*OidcProvider, error)
- func (c *Client) FindPermission(name string) (*Permission, error)
- func (c *Client) FindPermissionsInRole(name string) (*Role, error)
- func (c *Client) FindRealm(applicationName string, name string) (*Realm, error)
- func (c *Client) FindRole(name string) (*Role, error)
- func (c *Client) FindUser(account string) (*User, error)
- func (c *Client) FindUsersInGroup(name string) (*Group, error)
- func (c *Client) ListApplications(param *ApplicationSearchParams) ([]*Application, error)
- func (c *Client) ListGroups(param *GroupSearchParams) ([]*Group, error)
- func (c *Client) ListOidcApplications(param *OidcApplicationSearchParams) ([]*OidcApplication, error)
- func (c *Client) ListOidcProviders(param *OidcProviderSearchParams) ([]*OidcProvider, error)
- func (c *Client) ListPermissions(param *PermissionSearchParams) ([]*Permission, error)
- func (c *Client) ListRealms(applicationName string, param *RealmSearchParams) ([]*Realm, error)
- func (c *Client) ListRoles(param *RoleSearchParams) ([]*Role, error)
- func (c *Client) ListUsers(param *UserSearchParams) ([]*User, error)
- func (c *Client) PostJSON(path string, payload interface{}) (*http.Response, error)
- func (c *Client) PutJSON(path string, payload interface{}) (*http.Response, error)
- func (c *Client) RemovePermissionsFromRole(name string, deleteRequest *[]string) error
- func (c *Client) RemoveUsersFromGroup(name string, deleteRequest *[]string) error
- func (c *Client) Request(req *http.Request) (resp *http.Response, err error)
- func (c *Client) SignIn(signInRequest *SignInRequest) (*SignInResponse, error)
- func (c *Client) UpdateApplication(name string, updateRequest *ApplicationUpdateRequest) (*Application, error)
- func (c *Client) UpdateGroup(name string, updateRequest *GroupUpdateRequest) (*Group, error)
- func (c *Client) UpdateOidcApplication(name string, updateRequest *OidcApplicationUpdateRequest) (*OidcApplication, error)
- func (c *Client) UpdateOidcProvider(name string, updateRequest *OidcProviderUpdateRequest) (*OidcProvider, error)
- func (c *Client) UpdatePasswordCredential(updateRequest *PasswordCredentialUpdateRequest) (*PasswordCredential, error)
- func (c *Client) UpdatePermission(name string, updateRequest *PermissionUpdateRequest) (*Permission, error)
- func (c *Client) UpdateRealm(applicationName string, name string, updateRequest *RealmUpdateRequest) (*Realm, error)
- func (c *Client) UpdateRole(name string, updateRequest *RoleUpdateRequest) (*Role, error)
- func (c *Client) UpdateUser(account string, updateRequest *UserUpdateRequest) (*User, error)
- type Group
- type GroupCreateRequest
- type GroupSearchParams
- type GroupUpdateRequest
- type IdObject
- type OidcApplication
- type OidcApplicationCreateRequest
- type OidcApplicationSearchParams
- type OidcApplicationUpdateRequest
- type OidcProvider
- type OidcProviderCreateRequest
- type OidcProviderSearchParams
- type OidcProviderUpdateRequest
- type PasswordCredential
- type PasswordCredentialCreateRequest
- type PasswordCredentialUpdateRequest
- type Permission
- type PermissionCreateRequest
- type PermissionSearchParams
- type PermissionUpdateRequest
- type Realm
- type RealmCreateRequest
- type RealmSearchParams
- type RealmUpdateRequest
- type Role
- type RoleCreateRequest
- type RoleSearchParams
- type RoleUpdateRequest
- type SignInRequest
- type SignInResponse
- type User
- type UserCreateRequest
- type UserSearchParams
- type UserUpdateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` PassTo string `json:"pass_to"` VirtualPath string `json:"virtual_path"` TopPage string `json:"top_page"` }
Application application information
type ApplicationCreateRequest ¶
type ApplicationCreateRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` PassTo string `json:"pass_to,omitempty"` VirtualPath string `json:"virtual_path,omitempty"` TopPage string `json:"top_page,omitempty"` }
ApplicationCreateRequest request for creating an application
type ApplicationSearchParams ¶
ApplicationSearchParams parameters for search applications
type ApplicationUpdateRequest ¶
type ApplicationUpdateRequest ApplicationCreateRequest
ApplicationUpdateRequest request for creating an application
type Assignment ¶
type AssignmentRequest ¶
type AssignmentRequest struct { Group IdObject `json:"group"` Role IdObject `json:"role"` Realm IdObject `json:"realm"` }
AssignmentRequest request for creating an assignment
type Client ¶
type Client struct { BaseURL *url.URL Account string Password string Token string Verbose bool AdditionalHeaders http.Header }
Client api client for bouncr
func NewClientWithOptions ¶
func (*Client) AddPermissionsToRole ¶
AddPermissionsToRole add permissions to the role
func (*Client) AddUsersToGroup ¶
AddUsersToGroup add users to the group
func (*Client) CreateApplication ¶
func (c *Client) CreateApplication(createRequest *ApplicationCreateRequest) (*Application, error)
CreateApplication create an application
func (*Client) CreateAssignments ¶
func (c *Client) CreateAssignments(createRequest *[]AssignmentRequest) (*[]AssignmentRequest, error)
CreateAssignments create assignments
func (*Client) CreateGroup ¶
func (c *Client) CreateGroup(createRequest *GroupCreateRequest) (*Group, error)
CreateGroup create an group
func (*Client) CreateOidcApplication ¶
func (c *Client) CreateOidcApplication(createRequest *OidcApplicationCreateRequest) (*OidcApplication, error)
CreateOidcApplication create an oidcApplication
func (*Client) CreateOidcProvider ¶
func (c *Client) CreateOidcProvider(createRequest *OidcProviderCreateRequest) (*OidcProvider, error)
CreateOidcProvider create an oidcProvider
func (*Client) CreatePasswordCredential ¶
func (c *Client) CreatePasswordCredential(createRequest *PasswordCredentialCreateRequest) (*PasswordCredential, error)
CreatePasswordCredential create an password credential
func (*Client) CreatePermission ¶
func (c *Client) CreatePermission(createRequest *PermissionCreateRequest) (*Permission, error)
CreatePermission create an permission
func (*Client) CreateRealm ¶
func (c *Client) CreateRealm(applicationName string, createRequest *RealmCreateRequest) (*Realm, error)
CreateApplication create an application
func (*Client) CreateRole ¶
func (c *Client) CreateRole(createRequest *RoleCreateRequest) (*Role, error)
CreateRole create an role
func (*Client) CreateUser ¶
func (c *Client) CreateUser(createRequest *UserCreateRequest) (*User, error)
CreateUser create an user
func (*Client) DeleteApplication ¶
func (*Client) DeleteAssignments ¶
func (c *Client) DeleteAssignments(deleteRequest *[]AssignmentRequest) error
func (*Client) DeleteGroup ¶
func (*Client) DeleteOidcApplication ¶
func (*Client) DeleteOidcProvider ¶
func (*Client) DeletePasswordCredential ¶
DeletePasswordCredential delete an password credential
func (*Client) DeletePermission ¶
func (*Client) DeleteRealm ¶
func (*Client) DeleteRole ¶
func (*Client) DeleteUser ¶
func (*Client) FindApplication ¶
func (c *Client) FindApplication(name string) (*Application, error)
FindApplication find a application
func (*Client) FindAssignment ¶
func (c *Client) FindAssignment(findRequest *AssignmentRequest) (*Assignment, error)
FindAssignments find assignments
func (*Client) FindOidcApplication ¶
func (c *Client) FindOidcApplication(name string) (*OidcApplication, error)
FindOidcApplication find a oidcApplication
func (*Client) FindOidcProvider ¶
func (c *Client) FindOidcProvider(name string) (*OidcProvider, error)
FindOidcProvider find a oidcProvider
func (*Client) FindPermission ¶
func (c *Client) FindPermission(name string) (*Permission, error)
FindPermission find a permission
func (*Client) FindPermissionsInRole ¶
FindPermissionsInRole find permissions in a roles
func (*Client) FindUsersInGroup ¶
FindUsersInGroup find users in a groups
func (*Client) ListApplications ¶
func (c *Client) ListApplications(param *ApplicationSearchParams) ([]*Application, error)
ListApplications find the applications
func (*Client) ListGroups ¶
func (c *Client) ListGroups(param *GroupSearchParams) ([]*Group, error)
ListGroups find the groups
func (*Client) ListOidcApplications ¶
func (c *Client) ListOidcApplications(param *OidcApplicationSearchParams) ([]*OidcApplication, error)
ListOidcApplications find the oidcApplications
func (*Client) ListOidcProviders ¶
func (c *Client) ListOidcProviders(param *OidcProviderSearchParams) ([]*OidcProvider, error)
ListOidcProviders find the oidcProviders
func (*Client) ListPermissions ¶
func (c *Client) ListPermissions(param *PermissionSearchParams) ([]*Permission, error)
ListPermissions find the permissions
func (*Client) ListRealms ¶
func (c *Client) ListRealms(applicationName string, param *RealmSearchParams) ([]*Realm, error)
ListApplications find the applications
func (*Client) ListRoles ¶
func (c *Client) ListRoles(param *RoleSearchParams) ([]*Role, error)
ListRoles find the roles
func (*Client) ListUsers ¶
func (c *Client) ListUsers(param *UserSearchParams) ([]*User, error)
ListUsers find the users
func (*Client) RemovePermissionsFromRole ¶
func (*Client) RemoveUsersFromGroup ¶
func (*Client) SignIn ¶
func (c *Client) SignIn(signInRequest *SignInRequest) (*SignInResponse, error)
FindApplication find a application
func (*Client) UpdateApplication ¶
func (c *Client) UpdateApplication(name string, updateRequest *ApplicationUpdateRequest) (*Application, error)
UpdateApplication update an application
func (*Client) UpdateGroup ¶
func (c *Client) UpdateGroup(name string, updateRequest *GroupUpdateRequest) (*Group, error)
UpdateGroup update an group
func (*Client) UpdateOidcApplication ¶
func (c *Client) UpdateOidcApplication(name string, updateRequest *OidcApplicationUpdateRequest) (*OidcApplication, error)
UpdateOidcApplication update an oidcApplication
func (*Client) UpdateOidcProvider ¶
func (c *Client) UpdateOidcProvider(name string, updateRequest *OidcProviderUpdateRequest) (*OidcProvider, error)
UpdateOidcProvider update an oidcProvider
func (*Client) UpdatePasswordCredential ¶
func (c *Client) UpdatePasswordCredential(updateRequest *PasswordCredentialUpdateRequest) (*PasswordCredential, error)
UpdatePasswordCredential update an password credential
func (*Client) UpdatePermission ¶
func (c *Client) UpdatePermission(name string, updateRequest *PermissionUpdateRequest) (*Permission, error)
UpdatePermission update an permission
func (*Client) UpdateRealm ¶
func (c *Client) UpdateRealm(applicationName string, name string, updateRequest *RealmUpdateRequest) (*Realm, error)
UpdateRealm update an realm
func (*Client) UpdateRole ¶
func (c *Client) UpdateRole(name string, updateRequest *RoleUpdateRequest) (*Role, error)
UpdateRole update an role
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(account string, updateRequest *UserUpdateRequest) (*User, error)
UpdateUser update an user
type Group ¶
type Group struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Users *[]User `json:"users"` }
Group group information
type GroupCreateRequest ¶
type GroupCreateRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
GroupCreateRequest request for creating an group
type GroupSearchParams ¶
GroupSearchParams parameters for search groups
type GroupUpdateRequest ¶
type GroupUpdateRequest GroupCreateRequest
GroupUpdateRequest request for creating an group
type OidcApplication ¶
type OidcApplication struct { ID int `json:"id"` Name string `json:"name"` HomeURL string `json:"home_url"` CallbackURL string `json:"callback_url"` Description string `json:"description"` Permissions []string `json:"permissions"` }
OidcApplication oidcApplication information
type OidcApplicationCreateRequest ¶
type OidcApplicationCreateRequest struct { Name string `json:"name"` Description string `json:"description"` HomeURL string `json:"home_url"` CallbackURL string `json:"callback_url"` Permissions []string `json:"permissions,omitempty"` }
OidcApplicationCreateRequest request for creating an oidcApplication
type OidcApplicationSearchParams ¶
OidcApplicationSearchParams parameters for search oidcApplications
type OidcApplicationUpdateRequest ¶
type OidcApplicationUpdateRequest OidcApplicationCreateRequest
OidcApplicationUpdateRequest request for creating an oidcApplication
type OidcProvider ¶
type OidcProvider struct { ID int `json:"id"` Name string `json:"name"` ClientId string `json:"client_id"` ClientSecret string `json:"client_secret"` Scope string `json:"scope"` ResponseType string `json:"response_type"` AuthorizationEndpoint string `json:"authorization_endpoint"` TokenEndpoint string `json:"token_endpoint"` TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"` }
OidcProvider oidcProvider information
type OidcProviderCreateRequest ¶
type OidcProviderCreateRequest struct { Name string `json:"name"` ClientId string `json:"client_id"` ClientSecret string `json:"client_secret"` Scope string `json:"scope"` ResponseType string `json:"response_type"` AuthorizationEndpoint string `json:"authorization_endpoint"` TokenEndpoint string `json:"token_endpoint"` TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"` }
OidcProviderCreateRequest request for creating an oidcProvider
type OidcProviderSearchParams ¶
OidcProviderSearchParams parameters for search oidcProviders
type OidcProviderUpdateRequest ¶
type OidcProviderUpdateRequest OidcProviderCreateRequest
OidcProviderUpdateRequest request for creating an oidcProvider
type PasswordCredential ¶
type PasswordCredentialCreateRequest ¶
type PasswordCredentialCreateRequest struct { Account string `json:"account"` Password string `json:"password"` Initial bool `json:"initial"` }
PasswordCredentialCreateRequest request for creating an password credential
type PasswordCredentialUpdateRequest ¶
type PasswordCredentialUpdateRequest struct { Account string `json:"account"` OldPassword string `json:"old_password"` NewPassword string `json:"new_password"` }
PasswordCredentialUpdateRequest request for updating an password credential
type Permission ¶
type Permission struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` }
Permission permission information
type PermissionCreateRequest ¶
type PermissionCreateRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
PermissionCreateRequest request for creating an permission
type PermissionSearchParams ¶
PermissionSearchParams parameters for search permissions
type PermissionUpdateRequest ¶
type PermissionUpdateRequest PermissionCreateRequest
PermissionUpdateRequest request for creating an permission
type Realm ¶
type Realm struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` URL string `json:"url"` }
Realm realm information
type RealmCreateRequest ¶
type RealmCreateRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` URL string `json:"url,omitempty"` }
RealmCreateRequest request for creating an application
type RealmSearchParams ¶
RealmSearchParams parameters for search realms
type RealmUpdateRequest ¶
type RealmUpdateRequest RealmCreateRequest
RealmUpdateRequest request for creating an realm
type Role ¶
type Role struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Permissions *[]Permission `json:"permissions"` }
Role role information
type RoleCreateRequest ¶
type RoleCreateRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
RoleCreateRequest request for creating an role
type RoleSearchParams ¶
RoleSearchParams parameters for search roles
type RoleUpdateRequest ¶
type RoleUpdateRequest RoleCreateRequest
RoleUpdateRequest request for creating an role
type SignInRequest ¶
type SignInRequest struct { Account string `json:"account,omitempty"` Password string `json:"password,omitempty"` }
SignInRequest request for signing in
type SignInResponse ¶
type SignInResponse struct {
Token string `json:"token,omitempty"`
}
SignInResponse response for signing in
type User ¶
type User struct { ID int64 `json:"id"` Account string `json:"account"` UserProfiles map[string]interface{} `json:"user_profiles"` }
User user information
type UserCreateRequest ¶
type UserCreateRequest map[string]interface{}
UserCreateRequest request for creating an user
type UserSearchParams ¶
UserSearchParams parameters for search users
type UserUpdateRequest ¶
type UserUpdateRequest map[string]interface{}
UserUpdateRequest request for creating an user