apiv1alpha1

package
v1.33.0-20240319091308... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PermissionUpdate_Permissionship_name = map[int32]string{
		0: "PERMISSIONSHIP_UNSPECIFIED",
		1: "PERMISSIONSHIP_NO_PERMISSION",
		2: "PERMISSIONSHIP_HAS_PERMISSION",
	}
	PermissionUpdate_Permissionship_value = map[string]int32{
		"PERMISSIONSHIP_UNSPECIFIED":    0,
		"PERMISSIONSHIP_NO_PERMISSION":  1,
		"PERMISSIONSHIP_HAS_PERMISSION": 2,
	}
)

Enum value maps for PermissionUpdate_Permissionship.

View Source
var File_authzed_api_v1alpha1_schema_proto protoreflect.FileDescriptor
View Source
var File_authzed_api_v1alpha1_watchresources_service_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type PermissionUpdate

type PermissionUpdate struct {

	// subject defines the subject resource whose permissions have changed.
	Subject *v1.SubjectReference `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
	// resource defines the specific object in the system.
	Resource          *v1.ObjectReference             `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
	Relation          string                          `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"`
	UpdatedPermission PermissionUpdate_Permissionship `` /* 171-byte string literal not displayed */
	// contains filtered or unexported fields
}

PermissionUpdate represents a single permission update for a specific subject's permissions.

func (*PermissionUpdate) Descriptor deprecated

func (*PermissionUpdate) Descriptor() ([]byte, []int)

Deprecated: Use PermissionUpdate.ProtoReflect.Descriptor instead.

func (*PermissionUpdate) GetRelation

func (x *PermissionUpdate) GetRelation() string

func (*PermissionUpdate) GetResource

func (x *PermissionUpdate) GetResource() *v1.ObjectReference

func (*PermissionUpdate) GetSubject

func (x *PermissionUpdate) GetSubject() *v1.SubjectReference

func (*PermissionUpdate) GetUpdatedPermission

func (x *PermissionUpdate) GetUpdatedPermission() PermissionUpdate_Permissionship

func (*PermissionUpdate) ProtoMessage

func (*PermissionUpdate) ProtoMessage()

func (*PermissionUpdate) ProtoReflect

func (x *PermissionUpdate) ProtoReflect() protoreflect.Message

func (*PermissionUpdate) Reset

func (x *PermissionUpdate) Reset()

func (*PermissionUpdate) String

func (x *PermissionUpdate) String() string

type PermissionUpdate_Permissionship

type PermissionUpdate_Permissionship int32

todo: work this into the v1 core API at some point since it's used across services.

const (
	PermissionUpdate_PERMISSIONSHIP_UNSPECIFIED    PermissionUpdate_Permissionship = 0
	PermissionUpdate_PERMISSIONSHIP_NO_PERMISSION  PermissionUpdate_Permissionship = 1
	PermissionUpdate_PERMISSIONSHIP_HAS_PERMISSION PermissionUpdate_Permissionship = 2
)

func (PermissionUpdate_Permissionship) Descriptor

func (PermissionUpdate_Permissionship) Enum

func (PermissionUpdate_Permissionship) EnumDescriptor deprecated

func (PermissionUpdate_Permissionship) EnumDescriptor() ([]byte, []int)

Deprecated: Use PermissionUpdate_Permissionship.Descriptor instead.

func (PermissionUpdate_Permissionship) Number

func (PermissionUpdate_Permissionship) String

func (PermissionUpdate_Permissionship) Type

type ReadSchemaRequest

type ReadSchemaRequest struct {

	// The list of names of the Object Definitions that are being requested.
	//
	// These names must be fully qualified with their namespace (e.g.
	// myblog/post).
	ObjectDefinitionsNames []string `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

ReadSchemaRequest is the required data to read Object Definitions from a Schema.

func (*ReadSchemaRequest) Descriptor deprecated

func (*ReadSchemaRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadSchemaRequest.ProtoReflect.Descriptor instead.

func (*ReadSchemaRequest) GetObjectDefinitionsNames

func (x *ReadSchemaRequest) GetObjectDefinitionsNames() []string

func (*ReadSchemaRequest) ProtoMessage

func (*ReadSchemaRequest) ProtoMessage()

func (*ReadSchemaRequest) ProtoReflect

func (x *ReadSchemaRequest) ProtoReflect() protoreflect.Message

func (*ReadSchemaRequest) Reset

func (x *ReadSchemaRequest) Reset()

func (*ReadSchemaRequest) String

func (x *ReadSchemaRequest) String() string

type ReadSchemaResponse

type ReadSchemaResponse struct {

	// The Object Definitions that were requested.
	ObjectDefinitions []string `protobuf:"bytes,1,rep,name=object_definitions,json=objectDefinitions,proto3" json:"object_definitions,omitempty"`
	// The computed revision of the returned object definitions.
	ComputedDefinitionsRevision string `` /* 144-byte string literal not displayed */
	// contains filtered or unexported fields
}

ReadSchemaResponse is the resulting data after having read the Object Definitions from a Schema.

func (*ReadSchemaResponse) Descriptor deprecated

func (*ReadSchemaResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadSchemaResponse.ProtoReflect.Descriptor instead.

func (*ReadSchemaResponse) GetComputedDefinitionsRevision

func (x *ReadSchemaResponse) GetComputedDefinitionsRevision() string

func (*ReadSchemaResponse) GetObjectDefinitions

func (x *ReadSchemaResponse) GetObjectDefinitions() []string

func (*ReadSchemaResponse) ProtoMessage

func (*ReadSchemaResponse) ProtoMessage()

func (*ReadSchemaResponse) ProtoReflect

func (x *ReadSchemaResponse) ProtoReflect() protoreflect.Message

func (*ReadSchemaResponse) Reset

func (x *ReadSchemaResponse) Reset()

func (*ReadSchemaResponse) String

func (x *ReadSchemaResponse) String() string

type WatchResourcesRequest

type WatchResourcesRequest struct {

	// resource_object_type is the type of resource object for which we will
	// watch for changes.
	ResourceObjectType string `protobuf:"bytes,1,opt,name=resource_object_type,json=resourceObjectType,proto3" json:"resource_object_type,omitempty"`
	// permission is the name of the permission or relation for which we will
	// watch for changes.
	Permission string `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"`
	// subject_object_type is the type of the subject resource for which we will
	// watch for changes.
	SubjectObjectType string `protobuf:"bytes,3,opt,name=subject_object_type,json=subjectObjectType,proto3" json:"subject_object_type,omitempty"`
	// optional_subject_relation allows you to specify a group of subjects to watch
	// for a given subject type.
	OptionalSubjectRelation string       `` /* 132-byte string literal not displayed */
	OptionalStartCursor     *v1.ZedToken `protobuf:"bytes,5,opt,name=optional_start_cursor,json=optionalStartCursor,proto3" json:"optional_start_cursor,omitempty"`
	// contains filtered or unexported fields
}

WatchResourcesRequest starts a watch for specific permission updates for the given resource and subject types.

func (*WatchResourcesRequest) Descriptor deprecated

func (*WatchResourcesRequest) Descriptor() ([]byte, []int)

Deprecated: Use WatchResourcesRequest.ProtoReflect.Descriptor instead.

func (*WatchResourcesRequest) GetOptionalStartCursor

func (x *WatchResourcesRequest) GetOptionalStartCursor() *v1.ZedToken

func (*WatchResourcesRequest) GetOptionalSubjectRelation

func (x *WatchResourcesRequest) GetOptionalSubjectRelation() string

func (*WatchResourcesRequest) GetPermission

func (x *WatchResourcesRequest) GetPermission() string

func (*WatchResourcesRequest) GetResourceObjectType

func (x *WatchResourcesRequest) GetResourceObjectType() string

func (*WatchResourcesRequest) GetSubjectObjectType

func (x *WatchResourcesRequest) GetSubjectObjectType() string

func (*WatchResourcesRequest) ProtoMessage

func (*WatchResourcesRequest) ProtoMessage()

func (*WatchResourcesRequest) ProtoReflect

func (x *WatchResourcesRequest) ProtoReflect() protoreflect.Message

func (*WatchResourcesRequest) Reset

func (x *WatchResourcesRequest) Reset()

func (*WatchResourcesRequest) String

func (x *WatchResourcesRequest) String() string

type WatchResourcesResponse

type WatchResourcesResponse struct {
	Updates        []*PermissionUpdate `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"`
	ChangesThrough *v1.ZedToken        `protobuf:"bytes,2,opt,name=changes_through,json=changesThrough,proto3" json:"changes_through,omitempty"`
	// contains filtered or unexported fields
}

WatchResourcesResponse enumerates the list of permission updates that have occurred as a result of one or more relationship updates.

func (*WatchResourcesResponse) Descriptor deprecated

func (*WatchResourcesResponse) Descriptor() ([]byte, []int)

Deprecated: Use WatchResourcesResponse.ProtoReflect.Descriptor instead.

func (*WatchResourcesResponse) GetChangesThrough

func (x *WatchResourcesResponse) GetChangesThrough() *v1.ZedToken

func (*WatchResourcesResponse) GetUpdates

func (x *WatchResourcesResponse) GetUpdates() []*PermissionUpdate

func (*WatchResourcesResponse) ProtoMessage

func (*WatchResourcesResponse) ProtoMessage()

func (*WatchResourcesResponse) ProtoReflect

func (x *WatchResourcesResponse) ProtoReflect() protoreflect.Message

func (*WatchResourcesResponse) Reset

func (x *WatchResourcesResponse) Reset()

func (*WatchResourcesResponse) String

func (x *WatchResourcesResponse) String() string

type WriteSchemaRequest

type WriteSchemaRequest struct {

	// The Schema containing one or more Object Definitions that will be written
	// to the Permissions System.
	Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` // 256KiB
	// If specified, the existing revision of object definitions in the schema that must be present for
	// the write to succeed. If the revision specified differs (i.e. the underlying schema has changed),
	// the write call will fail with a FAILED_PRECONDITION error.
	OptionalDefinitionsRevisionPrecondition string `` /* 182-byte string literal not displayed */
	// contains filtered or unexported fields
}

WriteSchemaRequest is the required data used to "upsert" the Schema of a Permissions System.

func (*WriteSchemaRequest) Descriptor deprecated

func (*WriteSchemaRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteSchemaRequest.ProtoReflect.Descriptor instead.

func (*WriteSchemaRequest) GetOptionalDefinitionsRevisionPrecondition

func (x *WriteSchemaRequest) GetOptionalDefinitionsRevisionPrecondition() string

func (*WriteSchemaRequest) GetSchema

func (x *WriteSchemaRequest) GetSchema() string

func (*WriteSchemaRequest) ProtoMessage

func (*WriteSchemaRequest) ProtoMessage()

func (*WriteSchemaRequest) ProtoReflect

func (x *WriteSchemaRequest) ProtoReflect() protoreflect.Message

func (*WriteSchemaRequest) Reset

func (x *WriteSchemaRequest) Reset()

func (*WriteSchemaRequest) String

func (x *WriteSchemaRequest) String() string

type WriteSchemaResponse

type WriteSchemaResponse struct {

	// The names of the Object Definitions that were written.
	ObjectDefinitionsNames []string `` /* 129-byte string literal not displayed */
	// The computed revision of the written object definitions.
	ComputedDefinitionsRevision string `` /* 144-byte string literal not displayed */
	// contains filtered or unexported fields
}

WriteSchemaResponse is the resulting data after having written a Schema to a Permissions System.

func (*WriteSchemaResponse) Descriptor deprecated

func (*WriteSchemaResponse) Descriptor() ([]byte, []int)

Deprecated: Use WriteSchemaResponse.ProtoReflect.Descriptor instead.

func (*WriteSchemaResponse) GetComputedDefinitionsRevision

func (x *WriteSchemaResponse) GetComputedDefinitionsRevision() string

func (*WriteSchemaResponse) GetObjectDefinitionsNames

func (x *WriteSchemaResponse) GetObjectDefinitionsNames() []string

func (*WriteSchemaResponse) ProtoMessage

func (*WriteSchemaResponse) ProtoMessage()

func (*WriteSchemaResponse) ProtoReflect

func (x *WriteSchemaResponse) ProtoReflect() protoreflect.Message

func (*WriteSchemaResponse) Reset

func (x *WriteSchemaResponse) Reset()

func (*WriteSchemaResponse) String

func (x *WriteSchemaResponse) String() string

Jump to

Keyboard shortcuts

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