v1alpha1

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Overview

Package v1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	SchemaService_ReadSchema_FullMethodName  = "/authzed.api.v1alpha1.SchemaService/ReadSchema"
	SchemaService_WriteSchema_FullMethodName = "/authzed.api.v1alpha1.SchemaService/WriteSchema"
)
View Source
const (
	BufRepository = "buf.build/authzed/api"
	BufTag        = "9ba37ce98f37c5eeab64983a52fcc4a4910bc92f"
)
View Source
const (
	WatchResourcesService_WatchResources_FullMethodName = "/authzed.api.v1alpha1.WatchResourcesService/WatchResources"
)

Variables

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
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
View Source
var SchemaService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authzed.api.v1alpha1.SchemaService",
	HandlerType: (*SchemaServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ReadSchema",
			Handler:    _SchemaService_ReadSchema_Handler,
		},
		{
			MethodName: "WriteSchema",
			Handler:    _SchemaService_WriteSchema_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "authzed/api/v1alpha1/schema.proto",
}

SchemaService_ServiceDesc is the grpc.ServiceDesc for SchemaService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var WatchResourcesService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authzed.api.v1alpha1.WatchResourcesService",
	HandlerType: (*WatchResourcesServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchResources",
			Handler:       _WatchResourcesService_WatchResources_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "authzed/api/v1alpha1/watchresources_service.proto",
}

WatchResourcesService_ServiceDesc is the grpc.ServiceDesc for WatchResourcesService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSchemaServiceServer

func RegisterSchemaServiceServer(s grpc.ServiceRegistrar, srv SchemaServiceServer)

func RegisterWatchResourcesServiceHandler added in v0.4.0

func RegisterWatchResourcesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterWatchResourcesServiceHandler registers the http handlers for service WatchResourcesService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterWatchResourcesServiceHandlerClient added in v0.4.0

func RegisterWatchResourcesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WatchResourcesServiceClient) error

RegisterWatchResourcesServiceHandlerClient registers the http handlers for service WatchResourcesService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WatchResourcesServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WatchResourcesServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "WatchResourcesServiceClient" to call the correct interceptors.

func RegisterWatchResourcesServiceHandlerFromEndpoint added in v0.4.0

func RegisterWatchResourcesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterWatchResourcesServiceHandlerFromEndpoint is same as RegisterWatchResourcesServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterWatchResourcesServiceHandlerServer added in v0.4.0

func RegisterWatchResourcesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WatchResourcesServiceServer) error

RegisterWatchResourcesServiceHandlerServer registers the http handlers for service WatchResourcesService to "mux". UnaryRPC :call WatchResourcesServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWatchResourcesServiceHandlerFromEndpoint instead.

func RegisterWatchResourcesServiceServer added in v0.4.0

func RegisterWatchResourcesServiceServer(s grpc.ServiceRegistrar, srv WatchResourcesServiceServer)

Types

type PermissionUpdate added in v0.4.0

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) CloneMessageVT added in v0.9.0

func (m *PermissionUpdate) CloneMessageVT() proto.Message

func (*PermissionUpdate) CloneVT added in v0.8.0

func (m *PermissionUpdate) CloneVT() *PermissionUpdate

func (*PermissionUpdate) Descriptor deprecated added in v0.4.0

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

Deprecated: Use PermissionUpdate.ProtoReflect.Descriptor instead.

func (*PermissionUpdate) EqualMessageVT added in v0.11.0

func (this *PermissionUpdate) EqualMessageVT(thatMsg proto.Message) bool

func (*PermissionUpdate) EqualVT added in v0.11.0

func (this *PermissionUpdate) EqualVT(that *PermissionUpdate) bool

func (*PermissionUpdate) GetRelation added in v0.4.0

func (x *PermissionUpdate) GetRelation() string

func (*PermissionUpdate) GetResource added in v0.4.0

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

func (*PermissionUpdate) GetSubject added in v0.4.0

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

func (*PermissionUpdate) GetUpdatedPermission added in v0.4.0

func (x *PermissionUpdate) GetUpdatedPermission() PermissionUpdate_Permissionship

func (*PermissionUpdate) MarshalToSizedBufferVT added in v0.8.0

func (m *PermissionUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*PermissionUpdate) MarshalToVT added in v0.8.0

func (m *PermissionUpdate) MarshalToVT(dAtA []byte) (int, error)

func (*PermissionUpdate) MarshalVT added in v0.8.0

func (m *PermissionUpdate) MarshalVT() (dAtA []byte, err error)

func (*PermissionUpdate) ProtoMessage added in v0.4.0

func (*PermissionUpdate) ProtoMessage()

func (*PermissionUpdate) ProtoReflect added in v0.4.0

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

func (*PermissionUpdate) Reset added in v0.4.0

func (x *PermissionUpdate) Reset()

func (*PermissionUpdate) SizeVT added in v0.8.0

func (m *PermissionUpdate) SizeVT() (n int)

func (*PermissionUpdate) String added in v0.4.0

func (x *PermissionUpdate) String() string

func (*PermissionUpdate) UnmarshalVT added in v0.8.0

func (m *PermissionUpdate) UnmarshalVT(dAtA []byte) error

func (*PermissionUpdate) Validate added in v0.4.0

func (m *PermissionUpdate) Validate() error

Validate checks the field values on PermissionUpdate with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PermissionUpdate) ValidateAll added in v0.6.0

func (m *PermissionUpdate) ValidateAll() error

ValidateAll checks the field values on PermissionUpdate with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PermissionUpdateMultiError, or nil if none found.

type PermissionUpdateMultiError added in v0.6.0

type PermissionUpdateMultiError []error

PermissionUpdateMultiError is an error wrapping multiple validation errors returned by PermissionUpdate.ValidateAll() if the designated constraints aren't met.

func (PermissionUpdateMultiError) AllErrors added in v0.6.0

func (m PermissionUpdateMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PermissionUpdateMultiError) Error added in v0.6.0

Error returns a concatenation of all the error messages it wraps.

type PermissionUpdateValidationError added in v0.4.0

type PermissionUpdateValidationError struct {
	// contains filtered or unexported fields
}

PermissionUpdateValidationError is the validation error returned by PermissionUpdate.Validate if the designated constraints aren't met.

func (PermissionUpdateValidationError) Cause added in v0.4.0

Cause function returns cause value.

func (PermissionUpdateValidationError) Error added in v0.4.0

Error satisfies the builtin error interface

func (PermissionUpdateValidationError) ErrorName added in v0.4.0

ErrorName returns error name.

func (PermissionUpdateValidationError) Field added in v0.4.0

Field function returns field value.

func (PermissionUpdateValidationError) Key added in v0.4.0

Key function returns key value.

func (PermissionUpdateValidationError) Reason added in v0.4.0

Reason function returns reason value.

type PermissionUpdate_Permissionship added in v0.4.0

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 added in v0.4.0

func (PermissionUpdate_Permissionship) Enum added in v0.4.0

func (PermissionUpdate_Permissionship) EnumDescriptor deprecated added in v0.4.0

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

Deprecated: Use PermissionUpdate_Permissionship.Descriptor instead.

func (PermissionUpdate_Permissionship) Number added in v0.4.0

func (PermissionUpdate_Permissionship) String added in v0.4.0

func (PermissionUpdate_Permissionship) Type added in v0.4.0

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) CloneMessageVT added in v0.9.0

func (m *ReadSchemaRequest) CloneMessageVT() proto.Message

func (*ReadSchemaRequest) CloneVT added in v0.8.0

func (m *ReadSchemaRequest) CloneVT() *ReadSchemaRequest

func (*ReadSchemaRequest) Descriptor deprecated

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

Deprecated: Use ReadSchemaRequest.ProtoReflect.Descriptor instead.

func (*ReadSchemaRequest) EqualMessageVT added in v0.11.0

func (this *ReadSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool

func (*ReadSchemaRequest) EqualVT added in v0.11.0

func (this *ReadSchemaRequest) EqualVT(that *ReadSchemaRequest) bool

func (*ReadSchemaRequest) GetObjectDefinitionsNames

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

func (*ReadSchemaRequest) MarshalToSizedBufferVT added in v0.8.0

func (m *ReadSchemaRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ReadSchemaRequest) MarshalToVT added in v0.8.0

func (m *ReadSchemaRequest) MarshalToVT(dAtA []byte) (int, error)

func (*ReadSchemaRequest) MarshalVT added in v0.8.0

func (m *ReadSchemaRequest) MarshalVT() (dAtA []byte, err error)

func (*ReadSchemaRequest) ProtoMessage

func (*ReadSchemaRequest) ProtoMessage()

func (*ReadSchemaRequest) ProtoReflect

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

func (*ReadSchemaRequest) Reset

func (x *ReadSchemaRequest) Reset()

func (*ReadSchemaRequest) SizeVT added in v0.8.0

func (m *ReadSchemaRequest) SizeVT() (n int)

func (*ReadSchemaRequest) String

func (x *ReadSchemaRequest) String() string

func (*ReadSchemaRequest) UnmarshalVT added in v0.8.0

func (m *ReadSchemaRequest) UnmarshalVT(dAtA []byte) error

func (*ReadSchemaRequest) Validate

func (m *ReadSchemaRequest) Validate() error

Validate checks the field values on ReadSchemaRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ReadSchemaRequest) ValidateAll added in v0.6.0

func (m *ReadSchemaRequest) ValidateAll() error

ValidateAll checks the field values on ReadSchemaRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReadSchemaRequestMultiError, or nil if none found.

type ReadSchemaRequestMultiError added in v0.6.0

type ReadSchemaRequestMultiError []error

ReadSchemaRequestMultiError is an error wrapping multiple validation errors returned by ReadSchemaRequest.ValidateAll() if the designated constraints aren't met.

func (ReadSchemaRequestMultiError) AllErrors added in v0.6.0

func (m ReadSchemaRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ReadSchemaRequestMultiError) Error added in v0.6.0

Error returns a concatenation of all the error messages it wraps.

type ReadSchemaRequestValidationError

type ReadSchemaRequestValidationError struct {
	// contains filtered or unexported fields
}

ReadSchemaRequestValidationError is the validation error returned by ReadSchemaRequest.Validate if the designated constraints aren't met.

func (ReadSchemaRequestValidationError) Cause

Cause function returns cause value.

func (ReadSchemaRequestValidationError) Error

Error satisfies the builtin error interface

func (ReadSchemaRequestValidationError) ErrorName

ErrorName returns error name.

func (ReadSchemaRequestValidationError) Field

Field function returns field value.

func (ReadSchemaRequestValidationError) Key

Key function returns key value.

func (ReadSchemaRequestValidationError) Reason

Reason function returns reason value.

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) CloneMessageVT added in v0.9.0

func (m *ReadSchemaResponse) CloneMessageVT() proto.Message

func (*ReadSchemaResponse) CloneVT added in v0.8.0

func (m *ReadSchemaResponse) CloneVT() *ReadSchemaResponse

func (*ReadSchemaResponse) Descriptor deprecated

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

Deprecated: Use ReadSchemaResponse.ProtoReflect.Descriptor instead.

func (*ReadSchemaResponse) EqualMessageVT added in v0.11.0

func (this *ReadSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool

func (*ReadSchemaResponse) EqualVT added in v0.11.0

func (this *ReadSchemaResponse) EqualVT(that *ReadSchemaResponse) bool

func (*ReadSchemaResponse) GetComputedDefinitionsRevision added in v0.4.0

func (x *ReadSchemaResponse) GetComputedDefinitionsRevision() string

func (*ReadSchemaResponse) GetObjectDefinitions

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

func (*ReadSchemaResponse) MarshalToSizedBufferVT added in v0.8.0

func (m *ReadSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ReadSchemaResponse) MarshalToVT added in v0.8.0

func (m *ReadSchemaResponse) MarshalToVT(dAtA []byte) (int, error)

func (*ReadSchemaResponse) MarshalVT added in v0.8.0

func (m *ReadSchemaResponse) MarshalVT() (dAtA []byte, err error)

func (*ReadSchemaResponse) ProtoMessage

func (*ReadSchemaResponse) ProtoMessage()

func (*ReadSchemaResponse) ProtoReflect

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

func (*ReadSchemaResponse) Reset

func (x *ReadSchemaResponse) Reset()

func (*ReadSchemaResponse) SizeVT added in v0.8.0

func (m *ReadSchemaResponse) SizeVT() (n int)

func (*ReadSchemaResponse) String

func (x *ReadSchemaResponse) String() string

func (*ReadSchemaResponse) UnmarshalVT added in v0.8.0

func (m *ReadSchemaResponse) UnmarshalVT(dAtA []byte) error

func (*ReadSchemaResponse) Validate

func (m *ReadSchemaResponse) Validate() error

Validate checks the field values on ReadSchemaResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ReadSchemaResponse) ValidateAll added in v0.6.0

func (m *ReadSchemaResponse) ValidateAll() error

ValidateAll checks the field values on ReadSchemaResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReadSchemaResponseMultiError, or nil if none found.

type ReadSchemaResponseMultiError added in v0.6.0

type ReadSchemaResponseMultiError []error

ReadSchemaResponseMultiError is an error wrapping multiple validation errors returned by ReadSchemaResponse.ValidateAll() if the designated constraints aren't met.

func (ReadSchemaResponseMultiError) AllErrors added in v0.6.0

func (m ReadSchemaResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ReadSchemaResponseMultiError) Error added in v0.6.0

Error returns a concatenation of all the error messages it wraps.

type ReadSchemaResponseValidationError

type ReadSchemaResponseValidationError struct {
	// contains filtered or unexported fields
}

ReadSchemaResponseValidationError is the validation error returned by ReadSchemaResponse.Validate if the designated constraints aren't met.

func (ReadSchemaResponseValidationError) Cause

Cause function returns cause value.

func (ReadSchemaResponseValidationError) Error

Error satisfies the builtin error interface

func (ReadSchemaResponseValidationError) ErrorName

ErrorName returns error name.

func (ReadSchemaResponseValidationError) Field

Field function returns field value.

func (ReadSchemaResponseValidationError) Key

Key function returns key value.

func (ReadSchemaResponseValidationError) Reason

Reason function returns reason value.

type SchemaServiceClient

type SchemaServiceClient interface {
	// Read returns the current Object Definitions for a Permissions System.
	//
	// Errors include:
	// - INVALID_ARGUMENT: a provided value has failed to semantically validate
	// - NOT_FOUND: one of the Object Definitions being requested does not exist
	ReadSchema(ctx context.Context, in *ReadSchemaRequest, opts ...grpc.CallOption) (*ReadSchemaResponse, error)
	// Write overwrites the current Object Definitions for a Permissions System.
	//
	// Any Object Definitions that exist, but are not included will be deleted.
	WriteSchema(ctx context.Context, in *WriteSchemaRequest, opts ...grpc.CallOption) (*WriteSchemaResponse, error)
}

SchemaServiceClient is the client API for SchemaService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type SchemaServiceServer

type SchemaServiceServer interface {
	// Read returns the current Object Definitions for a Permissions System.
	//
	// Errors include:
	// - INVALID_ARGUMENT: a provided value has failed to semantically validate
	// - NOT_FOUND: one of the Object Definitions being requested does not exist
	ReadSchema(context.Context, *ReadSchemaRequest) (*ReadSchemaResponse, error)
	// Write overwrites the current Object Definitions for a Permissions System.
	//
	// Any Object Definitions that exist, but are not included will be deleted.
	WriteSchema(context.Context, *WriteSchemaRequest) (*WriteSchemaResponse, error)
	// contains filtered or unexported methods
}

SchemaServiceServer is the server API for SchemaService service. All implementations must embed UnimplementedSchemaServiceServer for forward compatibility

type UnimplementedSchemaServiceServer

type UnimplementedSchemaServiceServer struct {
}

UnimplementedSchemaServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSchemaServiceServer) ReadSchema

func (UnimplementedSchemaServiceServer) WriteSchema

type UnimplementedWatchResourcesServiceServer added in v0.4.0

type UnimplementedWatchResourcesServiceServer struct {
}

UnimplementedWatchResourcesServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedWatchResourcesServiceServer) WatchResources added in v0.4.0

type UnsafeSchemaServiceServer

type UnsafeSchemaServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeSchemaServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SchemaServiceServer will result in compilation errors.

type UnsafeWatchResourcesServiceServer added in v0.4.0

type UnsafeWatchResourcesServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeWatchResourcesServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WatchResourcesServiceServer will result in compilation errors.

type WatchResourcesRequest added in v0.4.0

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) CloneMessageVT added in v0.9.0

func (m *WatchResourcesRequest) CloneMessageVT() proto.Message

func (*WatchResourcesRequest) CloneVT added in v0.8.0

func (*WatchResourcesRequest) Descriptor deprecated added in v0.4.0

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

Deprecated: Use WatchResourcesRequest.ProtoReflect.Descriptor instead.

func (*WatchResourcesRequest) EqualMessageVT added in v0.11.0

func (this *WatchResourcesRequest) EqualMessageVT(thatMsg proto.Message) bool

func (*WatchResourcesRequest) EqualVT added in v0.11.0

func (this *WatchResourcesRequest) EqualVT(that *WatchResourcesRequest) bool

func (*WatchResourcesRequest) GetOptionalStartCursor added in v0.4.0

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

func (*WatchResourcesRequest) GetOptionalSubjectRelation added in v0.4.0

func (x *WatchResourcesRequest) GetOptionalSubjectRelation() string

func (*WatchResourcesRequest) GetPermission added in v0.4.0

func (x *WatchResourcesRequest) GetPermission() string

func (*WatchResourcesRequest) GetResourceObjectType added in v0.4.0

func (x *WatchResourcesRequest) GetResourceObjectType() string

func (*WatchResourcesRequest) GetSubjectObjectType added in v0.4.0

func (x *WatchResourcesRequest) GetSubjectObjectType() string

func (*WatchResourcesRequest) MarshalToSizedBufferVT added in v0.8.0

func (m *WatchResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WatchResourcesRequest) MarshalToVT added in v0.8.0

func (m *WatchResourcesRequest) MarshalToVT(dAtA []byte) (int, error)

func (*WatchResourcesRequest) MarshalVT added in v0.8.0

func (m *WatchResourcesRequest) MarshalVT() (dAtA []byte, err error)

func (*WatchResourcesRequest) ProtoMessage added in v0.4.0

func (*WatchResourcesRequest) ProtoMessage()

func (*WatchResourcesRequest) ProtoReflect added in v0.4.0

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

func (*WatchResourcesRequest) Reset added in v0.4.0

func (x *WatchResourcesRequest) Reset()

func (*WatchResourcesRequest) SizeVT added in v0.8.0

func (m *WatchResourcesRequest) SizeVT() (n int)

func (*WatchResourcesRequest) String added in v0.4.0

func (x *WatchResourcesRequest) String() string

func (*WatchResourcesRequest) UnmarshalVT added in v0.8.0

func (m *WatchResourcesRequest) UnmarshalVT(dAtA []byte) error

func (*WatchResourcesRequest) Validate added in v0.4.0

func (m *WatchResourcesRequest) Validate() error

Validate checks the field values on WatchResourcesRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*WatchResourcesRequest) ValidateAll added in v0.6.0

func (m *WatchResourcesRequest) ValidateAll() error

ValidateAll checks the field values on WatchResourcesRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in WatchResourcesRequestMultiError, or nil if none found.

type WatchResourcesRequestMultiError added in v0.6.0

type WatchResourcesRequestMultiError []error

WatchResourcesRequestMultiError is an error wrapping multiple validation errors returned by WatchResourcesRequest.ValidateAll() if the designated constraints aren't met.

func (WatchResourcesRequestMultiError) AllErrors added in v0.6.0

func (m WatchResourcesRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WatchResourcesRequestMultiError) Error added in v0.6.0

Error returns a concatenation of all the error messages it wraps.

type WatchResourcesRequestValidationError added in v0.4.0

type WatchResourcesRequestValidationError struct {
	// contains filtered or unexported fields
}

WatchResourcesRequestValidationError is the validation error returned by WatchResourcesRequest.Validate if the designated constraints aren't met.

func (WatchResourcesRequestValidationError) Cause added in v0.4.0

Cause function returns cause value.

func (WatchResourcesRequestValidationError) Error added in v0.4.0

Error satisfies the builtin error interface

func (WatchResourcesRequestValidationError) ErrorName added in v0.4.0

ErrorName returns error name.

func (WatchResourcesRequestValidationError) Field added in v0.4.0

Field function returns field value.

func (WatchResourcesRequestValidationError) Key added in v0.4.0

Key function returns key value.

func (WatchResourcesRequestValidationError) Reason added in v0.4.0

Reason function returns reason value.

type WatchResourcesResponse added in v0.4.0

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) CloneMessageVT added in v0.9.0

func (m *WatchResourcesResponse) CloneMessageVT() proto.Message

func (*WatchResourcesResponse) CloneVT added in v0.8.0

func (*WatchResourcesResponse) Descriptor deprecated added in v0.4.0

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

Deprecated: Use WatchResourcesResponse.ProtoReflect.Descriptor instead.

func (*WatchResourcesResponse) EqualMessageVT added in v0.11.0

func (this *WatchResourcesResponse) EqualMessageVT(thatMsg proto.Message) bool

func (*WatchResourcesResponse) EqualVT added in v0.11.0

func (this *WatchResourcesResponse) EqualVT(that *WatchResourcesResponse) bool

func (*WatchResourcesResponse) GetChangesThrough added in v0.4.0

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

func (*WatchResourcesResponse) GetUpdates added in v0.4.0

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

func (*WatchResourcesResponse) MarshalToSizedBufferVT added in v0.8.0

func (m *WatchResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WatchResourcesResponse) MarshalToVT added in v0.8.0

func (m *WatchResourcesResponse) MarshalToVT(dAtA []byte) (int, error)

func (*WatchResourcesResponse) MarshalVT added in v0.8.0

func (m *WatchResourcesResponse) MarshalVT() (dAtA []byte, err error)

func (*WatchResourcesResponse) ProtoMessage added in v0.4.0

func (*WatchResourcesResponse) ProtoMessage()

func (*WatchResourcesResponse) ProtoReflect added in v0.4.0

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

func (*WatchResourcesResponse) Reset added in v0.4.0

func (x *WatchResourcesResponse) Reset()

func (*WatchResourcesResponse) SizeVT added in v0.8.0

func (m *WatchResourcesResponse) SizeVT() (n int)

func (*WatchResourcesResponse) String added in v0.4.0

func (x *WatchResourcesResponse) String() string

func (*WatchResourcesResponse) UnmarshalVT added in v0.8.0

func (m *WatchResourcesResponse) UnmarshalVT(dAtA []byte) error

func (*WatchResourcesResponse) Validate added in v0.4.0

func (m *WatchResourcesResponse) Validate() error

Validate checks the field values on WatchResourcesResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*WatchResourcesResponse) ValidateAll added in v0.6.0

func (m *WatchResourcesResponse) ValidateAll() error

ValidateAll checks the field values on WatchResourcesResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in WatchResourcesResponseMultiError, or nil if none found.

type WatchResourcesResponseMultiError added in v0.6.0

type WatchResourcesResponseMultiError []error

WatchResourcesResponseMultiError is an error wrapping multiple validation errors returned by WatchResourcesResponse.ValidateAll() if the designated constraints aren't met.

func (WatchResourcesResponseMultiError) AllErrors added in v0.6.0

func (m WatchResourcesResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WatchResourcesResponseMultiError) Error added in v0.6.0

Error returns a concatenation of all the error messages it wraps.

type WatchResourcesResponseValidationError added in v0.4.0

type WatchResourcesResponseValidationError struct {
	// contains filtered or unexported fields
}

WatchResourcesResponseValidationError is the validation error returned by WatchResourcesResponse.Validate if the designated constraints aren't met.

func (WatchResourcesResponseValidationError) Cause added in v0.4.0

Cause function returns cause value.

func (WatchResourcesResponseValidationError) Error added in v0.4.0

Error satisfies the builtin error interface

func (WatchResourcesResponseValidationError) ErrorName added in v0.4.0

ErrorName returns error name.

func (WatchResourcesResponseValidationError) Field added in v0.4.0

Field function returns field value.

func (WatchResourcesResponseValidationError) Key added in v0.4.0

Key function returns key value.

func (WatchResourcesResponseValidationError) Reason added in v0.4.0

Reason function returns reason value.

type WatchResourcesServiceClient added in v0.4.0

type WatchResourcesServiceClient interface {
	// WatchResources initiates a watch for permission changes for the provided
	// (resource type, permission, subject) pair.
	WatchResources(ctx context.Context, in *WatchResourcesRequest, opts ...grpc.CallOption) (WatchResourcesService_WatchResourcesClient, error)
}

WatchResourcesServiceClient is the client API for WatchResourcesService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewWatchResourcesServiceClient added in v0.4.0

func NewWatchResourcesServiceClient(cc grpc.ClientConnInterface) WatchResourcesServiceClient

type WatchResourcesServiceServer added in v0.4.0

type WatchResourcesServiceServer interface {
	// WatchResources initiates a watch for permission changes for the provided
	// (resource type, permission, subject) pair.
	WatchResources(*WatchResourcesRequest, WatchResourcesService_WatchResourcesServer) error
	// contains filtered or unexported methods
}

WatchResourcesServiceServer is the server API for WatchResourcesService service. All implementations must embed UnimplementedWatchResourcesServiceServer for forward compatibility

type WatchResourcesService_WatchResourcesClient added in v0.4.0

type WatchResourcesService_WatchResourcesClient interface {
	Recv() (*WatchResourcesResponse, error)
	grpc.ClientStream
}

type WatchResourcesService_WatchResourcesServer added in v0.4.0

type WatchResourcesService_WatchResourcesServer interface {
	Send(*WatchResourcesResponse) error
	grpc.ServerStream
}

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) CloneMessageVT added in v0.9.0

func (m *WriteSchemaRequest) CloneMessageVT() proto.Message

func (*WriteSchemaRequest) CloneVT added in v0.8.0

func (m *WriteSchemaRequest) CloneVT() *WriteSchemaRequest

func (*WriteSchemaRequest) Descriptor deprecated

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

Deprecated: Use WriteSchemaRequest.ProtoReflect.Descriptor instead.

func (*WriteSchemaRequest) EqualMessageVT added in v0.11.0

func (this *WriteSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool

func (*WriteSchemaRequest) EqualVT added in v0.11.0

func (this *WriteSchemaRequest) EqualVT(that *WriteSchemaRequest) bool

func (*WriteSchemaRequest) GetOptionalDefinitionsRevisionPrecondition added in v0.4.0

func (x *WriteSchemaRequest) GetOptionalDefinitionsRevisionPrecondition() string

func (*WriteSchemaRequest) GetSchema

func (x *WriteSchemaRequest) GetSchema() string

func (*WriteSchemaRequest) MarshalToSizedBufferVT added in v0.8.0

func (m *WriteSchemaRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WriteSchemaRequest) MarshalToVT added in v0.8.0

func (m *WriteSchemaRequest) MarshalToVT(dAtA []byte) (int, error)

func (*WriteSchemaRequest) MarshalVT added in v0.8.0

func (m *WriteSchemaRequest) MarshalVT() (dAtA []byte, err error)

func (*WriteSchemaRequest) ProtoMessage

func (*WriteSchemaRequest) ProtoMessage()

func (*WriteSchemaRequest) ProtoReflect

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

func (*WriteSchemaRequest) Reset

func (x *WriteSchemaRequest) Reset()

func (*WriteSchemaRequest) SizeVT added in v0.8.0

func (m *WriteSchemaRequest) SizeVT() (n int)

func (*WriteSchemaRequest) String

func (x *WriteSchemaRequest) String() string

func (*WriteSchemaRequest) UnmarshalVT added in v0.8.0

func (m *WriteSchemaRequest) UnmarshalVT(dAtA []byte) error

func (*WriteSchemaRequest) Validate

func (m *WriteSchemaRequest) Validate() error

Validate checks the field values on WriteSchemaRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*WriteSchemaRequest) ValidateAll added in v0.6.0

func (m *WriteSchemaRequest) ValidateAll() error

ValidateAll checks the field values on WriteSchemaRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in WriteSchemaRequestMultiError, or nil if none found.

type WriteSchemaRequestMultiError added in v0.6.0

type WriteSchemaRequestMultiError []error

WriteSchemaRequestMultiError is an error wrapping multiple validation errors returned by WriteSchemaRequest.ValidateAll() if the designated constraints aren't met.

func (WriteSchemaRequestMultiError) AllErrors added in v0.6.0

func (m WriteSchemaRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WriteSchemaRequestMultiError) Error added in v0.6.0

Error returns a concatenation of all the error messages it wraps.

type WriteSchemaRequestValidationError

type WriteSchemaRequestValidationError struct {
	// contains filtered or unexported fields
}

WriteSchemaRequestValidationError is the validation error returned by WriteSchemaRequest.Validate if the designated constraints aren't met.

func (WriteSchemaRequestValidationError) Cause

Cause function returns cause value.

func (WriteSchemaRequestValidationError) Error

Error satisfies the builtin error interface

func (WriteSchemaRequestValidationError) ErrorName

ErrorName returns error name.

func (WriteSchemaRequestValidationError) Field

Field function returns field value.

func (WriteSchemaRequestValidationError) Key

Key function returns key value.

func (WriteSchemaRequestValidationError) Reason

Reason function returns reason value.

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) CloneMessageVT added in v0.9.0

func (m *WriteSchemaResponse) CloneMessageVT() proto.Message

func (*WriteSchemaResponse) CloneVT added in v0.8.0

func (*WriteSchemaResponse) Descriptor deprecated

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

Deprecated: Use WriteSchemaResponse.ProtoReflect.Descriptor instead.

func (*WriteSchemaResponse) EqualMessageVT added in v0.11.0

func (this *WriteSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool

func (*WriteSchemaResponse) EqualVT added in v0.11.0

func (this *WriteSchemaResponse) EqualVT(that *WriteSchemaResponse) bool

func (*WriteSchemaResponse) GetComputedDefinitionsRevision added in v0.4.0

func (x *WriteSchemaResponse) GetComputedDefinitionsRevision() string

func (*WriteSchemaResponse) GetObjectDefinitionsNames

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

func (*WriteSchemaResponse) MarshalToSizedBufferVT added in v0.8.0

func (m *WriteSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*WriteSchemaResponse) MarshalToVT added in v0.8.0

func (m *WriteSchemaResponse) MarshalToVT(dAtA []byte) (int, error)

func (*WriteSchemaResponse) MarshalVT added in v0.8.0

func (m *WriteSchemaResponse) MarshalVT() (dAtA []byte, err error)

func (*WriteSchemaResponse) ProtoMessage

func (*WriteSchemaResponse) ProtoMessage()

func (*WriteSchemaResponse) ProtoReflect

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

func (*WriteSchemaResponse) Reset

func (x *WriteSchemaResponse) Reset()

func (*WriteSchemaResponse) SizeVT added in v0.8.0

func (m *WriteSchemaResponse) SizeVT() (n int)

func (*WriteSchemaResponse) String

func (x *WriteSchemaResponse) String() string

func (*WriteSchemaResponse) UnmarshalVT added in v0.8.0

func (m *WriteSchemaResponse) UnmarshalVT(dAtA []byte) error

func (*WriteSchemaResponse) Validate

func (m *WriteSchemaResponse) Validate() error

Validate checks the field values on WriteSchemaResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*WriteSchemaResponse) ValidateAll added in v0.6.0

func (m *WriteSchemaResponse) ValidateAll() error

ValidateAll checks the field values on WriteSchemaResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in WriteSchemaResponseMultiError, or nil if none found.

type WriteSchemaResponseMultiError added in v0.6.0

type WriteSchemaResponseMultiError []error

WriteSchemaResponseMultiError is an error wrapping multiple validation errors returned by WriteSchemaResponse.ValidateAll() if the designated constraints aren't met.

func (WriteSchemaResponseMultiError) AllErrors added in v0.6.0

func (m WriteSchemaResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WriteSchemaResponseMultiError) Error added in v0.6.0

Error returns a concatenation of all the error messages it wraps.

type WriteSchemaResponseValidationError

type WriteSchemaResponseValidationError struct {
	// contains filtered or unexported fields
}

WriteSchemaResponseValidationError is the validation error returned by WriteSchemaResponse.Validate if the designated constraints aren't met.

func (WriteSchemaResponseValidationError) Cause

Cause function returns cause value.

func (WriteSchemaResponseValidationError) Error

Error satisfies the builtin error interface

func (WriteSchemaResponseValidationError) ErrorName

ErrorName returns error name.

func (WriteSchemaResponseValidationError) Field

Field function returns field value.

func (WriteSchemaResponseValidationError) Key

Key function returns key value.

func (WriteSchemaResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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