types

package
v1.12.5 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

TODO: check if types should be removed from here, and set in correct packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	Resource          *Resource `bson:"resource" json:"resource,omitempty"`
	BindingID         string    `bson:"bindingId" json:"bindingId"`
	CRUDDocumentState string    `bson:"__STATE__" json:"-"`
	Groups            []string  `bson:"groups" json:"groups,omitempty"`
	Subjects          []string  `bson:"subjects" json:"subjects,omitempty"`
	Permissions       []string  `bson:"permissions" json:"permissions,omitempty"`
	Roles             []string  `bson:"roles" json:"roles,omitempty"`
}

type BindingCreateResponse

type BindingCreateResponse struct {
	ObjectID string `json:"_id"`
}

type BindingUpdate

type BindingUpdate struct {
	Groups   []string `bson:"groups" json:"groups"`
	Subjects []string `bson:"subjects" json:"subjects"`
}

type MongoClient added in v1.12.2

type MongoClient interface {
	Collection(collectionName string) *mongo.Collection
	Disconnect() error
}

type RequestError

type RequestError struct {
	Error      string `json:"error"`
	Message    string `json:"message"`
	StatusCode int    `json:"statusCode"`
}

type Resource

type Resource struct {
	ResourceType string `bson:"resourceType" json:"resourceType,omitempty"`
	ResourceID   string `bson:"resourceId" json:"resourceId,omitempty"`
}

type Role

type Role struct {
	RoleID            string   `bson:"roleId" json:"roleId"`
	RoleName          string   `bson:"name" json:"name"`
	CRUDDocumentState string   `bson:"__STATE__" json:"-"`
	Permissions       []string `bson:"permissions" json:"permissions"`
}

type User

type User struct {
	ID         string
	Groups     []string
	Properties map[string]any
}

Jump to

Keyboard shortcuts

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