mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
shared/api: Introduce Access structs
Signed-off-by: Sahaj Bhakta <sahajbhakta@gmail.com>
This commit is contained in:
committed by
Stéphane Graber
parent
76d2f1c88e
commit
830b522a17
27
shared/api/access.go
Normal file
27
shared/api/access.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package api
|
||||
|
||||
// Access represents everyone that may access a particular resource.
|
||||
//
|
||||
// swagger:model
|
||||
//
|
||||
// API extension: instance_access.
|
||||
type Access []AccessEntry
|
||||
|
||||
// AccessEntry represents an entity having access to the resource.
|
||||
//
|
||||
// swagger:model
|
||||
//
|
||||
// API extension: instance_access.
|
||||
type AccessEntry struct {
|
||||
// Certificate fingerprint
|
||||
// Example: 636b69519d27ae3b0e398cb7928043846ce1e3842f0ca7a589993dd913ab8cc9
|
||||
Identifier string `json:"identifier" yaml:"identifier"`
|
||||
|
||||
// The role associated with the certificate
|
||||
// Example: admin, view, operator
|
||||
Role string `json:"role" yaml:"role"`
|
||||
|
||||
// Which authorization method the certificate uses
|
||||
// Example: tls, openfga
|
||||
Provider string `json:"provider" yaml:"provider"`
|
||||
}
|
||||
Reference in New Issue
Block a user