Documentation ¶
Index ¶
- Constants
- type AuthorizeMany
- func (a *AuthorizeMany) GetEntityIDs() []primitive.ObjectID
- func (a *AuthorizeMany) GetPrincipalID() primitive.ObjectID
- func (a *AuthorizeMany) GetRole() int64
- func (a *AuthorizeMany) SetEntityIDs(entityIDs []primitive.ObjectID)
- func (a *AuthorizeMany) SetPrincipalID(principalID primitive.ObjectID)
- func (a *AuthorizeMany) SetRole(role int64)
- type AuthorizeManyResponse
- type AuthorizeResponse
- type Key
- type StructTag
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeMany ¶ added in v1.36.0
type AuthorizeMany struct { // A list of MongoDB Object IDs representing the entities to be authorized. // example: [5f8f9a9a9a9a9a9a9a9a9a9a, 5f8f9a9a9a9a9a9a9a9a9a9a] // required: true EntityIDs *[]primitive.ObjectID `json:"entity_ids" validate:"nonnilpointer"` // The MongoDB Object ID of the principal being authorized to access the entities. // example: 5f8f9a9a9a9a9a9a9a9a9a9a // required: true PrincipalID *primitive.ObjectID `json:"principal_id" validate:"nonnilpointer,nonzeropointerelem"` // The role assigned to the principal for the authorized entities. Must be a valid integer role as defined in authorization microservice. // example: 1 // required: true Role *int64 `json:"role" validate:"nonnilpointer,roleintrange"` }
AuthorizeMany represents the payload required to authorize multiple entities. swagger:model
func NewAuthorizeMany ¶ added in v1.36.0
func (*AuthorizeMany) GetEntityIDs ¶ added in v1.36.0
func (a *AuthorizeMany) GetEntityIDs() []primitive.ObjectID
func (*AuthorizeMany) GetPrincipalID ¶ added in v1.36.0
func (a *AuthorizeMany) GetPrincipalID() primitive.ObjectID
func (*AuthorizeMany) GetRole ¶ added in v1.36.0
func (a *AuthorizeMany) GetRole() int64
func (*AuthorizeMany) SetEntityIDs ¶ added in v1.36.0
func (a *AuthorizeMany) SetEntityIDs(entityIDs []primitive.ObjectID)
func (*AuthorizeMany) SetPrincipalID ¶ added in v1.36.0
func (a *AuthorizeMany) SetPrincipalID(principalID primitive.ObjectID)
func (*AuthorizeMany) SetRole ¶ added in v1.36.0
func (a *AuthorizeMany) SetRole(role int64)
type AuthorizeManyResponse ¶ added in v1.36.1
type AuthorizeManyResponse struct { // The unauthorized entity IDs. // example: [5f6d4b9b9c6f9f0001b9c6f9] UnallowedEntities []primitive.ObjectID `json:"unallowed_entities"` }
AuthorizeManyResponse represents an authorization response for the authorization of multiple entities where a list of unauthorized entity IDs is returned. swagger:model
type AuthorizeResponse ¶ added in v1.36.1
type AuthorizeResponse struct { // The status code. // example: 200 Code int `json:"code"` }
AuthorizeResponse represents an authorization response for a single entity where a simple status code is returned. swagger:model
Click to show internal directories.
Click to hide internal directories.