Documentation ¶
Index ¶
- type Role
- type RoleQuery
- type V1Service
- func (svc *V1Service) Create(role *Role) error
- func (svc *V1Service) Destroy(id int32) error
- func (svc *V1Service) GetOne(id int32) (*Role, error)
- func (svc *V1Service) Query(query *RoleQuery) ([]Role, error)
- func (svc *V1Service) Update(role *Role) error
- func (svc *V1Service) UpdateRaw(id int32, role interface{}) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Role ¶
type Role struct { ID *int32 `json:"id,omitempty"` Name *string `json:"name,omitempty"` Admins []int32 `json:"admins,omitempty"` Apps []int32 `json:"apps,omitempty"` Users []int32 `json:"users,omitempty"` }
Role represents the Role resource in OneLogin
type V1Service ¶
type V1Service struct {
Endpoint, ErrorContext string
Repository services.Repository
}
V1Service holds the information needed to interface with a repository
func New ¶
func New(repo services.Repository, host string) *V1Service
New creates the new svc service v1.
func (*V1Service) Create ¶
Create takes a role without an id and attempts to use the parameters to create it in the API. Modifies the role in place, or returns an error if one occurs
func (*V1Service) Destroy ¶
Destroy deletes the role with the given id, and if successful, it returns nil
func (*V1Service) Query ¶
Query retrieves all the roles from the repository that meet the query criteria passed in the request payload. If an empty payload is given, it will retrieve all roles
Click to show internal directories.
Click to hide internal directories.