v1alpha1

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

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        = "dc592e107033a7a4336935cf94fb90426719508d"
)
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

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

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

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

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

func RegisterWatchResourcesServiceServer(s grpc.ServiceRegistrar, srv WatchResourcesServiceServer)

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) CloneMessageVT

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

func (*PermissionUpdate) CloneVT

func (m *PermissionUpdate) CloneVT() *PermissionUpdate

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) MarshalToSizedBufferVT

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

func (*PermissionUpdate) MarshalToVT

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

func (*PermissionUpdate) MarshalVT

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

func (*PermissionUpdate) ProtoMessage

func (*PermissionUpdate) ProtoMessage()

func (*PermissionUpdate) ProtoReflect

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

func (*PermissionUpdate) Reset

func (x *PermissionUpdate) Reset()

func (*PermissionUpdate) SizeVT

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

func (*PermissionUpdate) String

func (x *PermissionUpdate) String() string

func (*PermissionUpdate) UnmarshalVT

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

func (*PermissionUpdate) Validate

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

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

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

func (m PermissionUpdateMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PermissionUpdateMultiError) Error

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

type PermissionUpdateValidationError

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

Cause function returns cause value.

func (PermissionUpdateValidationError) Error

Error satisfies the builtin error interface

func (PermissionUpdateValidationError) ErrorName

ErrorName returns error name.

func (PermissionUpdateValidationError) Field

Field function returns field value.

func (PermissionUpdateValidationError) Key

Key function returns key value.

func (PermissionUpdateValidationError) Reason

Reason function returns reason value.

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) CloneMessageVT

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

func (*ReadSchemaRequest) CloneVT

func (m *ReadSchemaRequest) CloneVT() *ReadSchemaRequest

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) MarshalToSizedBufferVT

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

func (*ReadSchemaRequest) MarshalToVT

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

func (*ReadSchemaRequest) MarshalVT

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

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

func (*ReadSchemaRequest) String

func (x *ReadSchemaRequest) String() string

func (*ReadSchemaRequest) UnmarshalVT

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

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

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

func (m ReadSchemaRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ReadSchemaRequestMultiError) Error

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

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

func (*ReadSchemaResponse) CloneVT

func (m *ReadSchemaResponse) CloneVT() *ReadSchemaResponse

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) MarshalToSizedBufferVT

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

func (*ReadSchemaResponse) MarshalToVT

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

func (*ReadSchemaResponse) MarshalVT

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

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

func (*ReadSchemaResponse) String

func (x *ReadSchemaResponse) String() string

func (*ReadSchemaResponse) UnmarshalVT

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

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

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

func (m ReadSchemaResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ReadSchemaResponseMultiError) Error

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

type UnimplementedWatchResourcesServiceServer struct {
}

UnimplementedWatchResourcesServiceServer must be embedded to have forward compatible implementations.

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

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

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

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

func (*WatchResourcesRequest) CloneVT

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) MarshalToSizedBufferVT

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

func (*WatchResourcesRequest) MarshalToVT

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

func (*WatchResourcesRequest) MarshalVT

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

func (*WatchResourcesRequest) ProtoMessage

func (*WatchResourcesRequest) ProtoMessage()

func (*WatchResourcesRequest) ProtoReflect

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

func (*WatchResourcesRequest) Reset

func (x *WatchResourcesRequest) Reset()

func (*WatchResourcesRequest) SizeVT

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

func (*WatchResourcesRequest) String

func (x *WatchResourcesRequest) String() string

func (*WatchResourcesRequest) UnmarshalVT

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

func (*WatchResourcesRequest) Validate

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

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

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

func (m WatchResourcesRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WatchResourcesRequestMultiError) Error

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

type WatchResourcesRequestValidationError

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

Cause function returns cause value.

func (WatchResourcesRequestValidationError) Error

Error satisfies the builtin error interface

func (WatchResourcesRequestValidationError) ErrorName

ErrorName returns error name.

func (WatchResourcesRequestValidationError) Field

Field function returns field value.

func (WatchResourcesRequestValidationError) Key

Key function returns key value.

func (WatchResourcesRequestValidationError) Reason

Reason function returns reason value.

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) CloneMessageVT

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

func (*WatchResourcesResponse) CloneVT

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) MarshalToSizedBufferVT

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

func (*WatchResourcesResponse) MarshalToVT

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

func (*WatchResourcesResponse) MarshalVT

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

func (*WatchResourcesResponse) ProtoMessage

func (*WatchResourcesResponse) ProtoMessage()

func (*WatchResourcesResponse) ProtoReflect

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

func (*WatchResourcesResponse) Reset

func (x *WatchResourcesResponse) Reset()

func (*WatchResourcesResponse) SizeVT

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

func (*WatchResourcesResponse) String

func (x *WatchResourcesResponse) String() string

func (*WatchResourcesResponse) UnmarshalVT

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

func (*WatchResourcesResponse) Validate

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

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

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

func (m WatchResourcesResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WatchResourcesResponseMultiError) Error

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

type WatchResourcesResponseValidationError

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

Cause function returns cause value.

func (WatchResourcesResponseValidationError) Error

Error satisfies the builtin error interface

func (WatchResourcesResponseValidationError) ErrorName

ErrorName returns error name.

func (WatchResourcesResponseValidationError) Field

Field function returns field value.

func (WatchResourcesResponseValidationError) Key

Key function returns key value.

func (WatchResourcesResponseValidationError) Reason

Reason function returns reason value.

type WatchResourcesServiceClient

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.

type WatchResourcesServiceServer

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

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

type WatchResourcesService_WatchResourcesServer

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

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

func (*WriteSchemaRequest) CloneVT

func (m *WriteSchemaRequest) CloneVT() *WriteSchemaRequest

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) MarshalToSizedBufferVT

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

func (*WriteSchemaRequest) MarshalToVT

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

func (*WriteSchemaRequest) MarshalVT

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

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

func (*WriteSchemaRequest) String

func (x *WriteSchemaRequest) String() string

func (*WriteSchemaRequest) UnmarshalVT

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

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

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

func (m WriteSchemaRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WriteSchemaRequestMultiError) Error

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

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

func (*WriteSchemaResponse) CloneVT

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) MarshalToSizedBufferVT

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

func (*WriteSchemaResponse) MarshalToVT

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

func (*WriteSchemaResponse) MarshalVT

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

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

func (*WriteSchemaResponse) String

func (x *WriteSchemaResponse) String() string

func (*WriteSchemaResponse) UnmarshalVT

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

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

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

func (m WriteSchemaResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WriteSchemaResponseMultiError) Error

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