api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-api. DO NOT EDIT.

Code generated by protoc-gen-api. DO NOT EDIT.

Code generated by protoc-gen-api. DO NOT EDIT.

Index

Constants

View Source
const KindAuthz = "Authz"
View Source
const KindRusMessage = "RusMessage"
View Source
const KindRusMethod = "RusMethod"
View Source
const KindRusService = "RusService"

Variables

View Source
var (
	NamespacePermission_name = map[int32]string{
		0: "NAMESPACE_PERMISSION_UNSPECIFIED",
		1: "NAMESPACE_PERMISSION_READ_ONLY",
		2: "NAMESPACE_PERMISSION_WRITE",
	}
	NamespacePermission_value = map[string]int32{
		"NAMESPACE_PERMISSION_UNSPECIFIED": 0,
		"NAMESPACE_PERMISSION_READ_ONLY":   1,
		"NAMESPACE_PERMISSION_WRITE":       2,
	}
)

Enum value maps for NamespacePermission.

View Source
var (
	OrganisationPermission_name = map[int32]string{
		0: "ORGANISATION_PERMISSION_UNSPECIFIED",
		1: "ORGANISATION_PERMISSION_OWNER",
	}
	OrganisationPermission_value = map[string]int32{
		"ORGANISATION_PERMISSION_UNSPECIFIED": 0,
		"ORGANISATION_PERMISSION_OWNER":       1,
	}
)

Enum value maps for OrganisationPermission.

View Source
var (
	MessageType_name = map[int32]string{
		0: "MESSAGE_TYPE_UNSPECIFIED",
		1: "MESSAGE_TYPE_KIND",
		2: "MESSAGE_TYPE_LIST",
		3: "MESSAGE_TYPE_SPEC",
		4: "MESSAGE_TYPE_STATUS",
	}
	MessageType_value = map[string]int32{
		"MESSAGE_TYPE_UNSPECIFIED": 0,
		"MESSAGE_TYPE_KIND":        1,
		"MESSAGE_TYPE_LIST":        2,
		"MESSAGE_TYPE_SPEC":        3,
		"MESSAGE_TYPE_STATUS":      4,
	}
)

Enum value maps for MessageType.

View Source
var (
	// optional api.RusMethod rus_method = 74295728;
	E_RusMethod = &file_lib_proto_api_annotations_proto_extTypes[1]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var (
	// optional api.RusMessage rus_msg = 74295729;
	E_RusMsg = &file_lib_proto_api_annotations_proto_extTypes[2]
)

Extension fields to descriptorpb.MessageOptions.

View Source
var (
	// optional api.RusService rus_service = 74295727;
	E_RusService = &file_lib_proto_api_annotations_proto_extTypes[0]
)

Extension fields to descriptorpb.ServiceOptions.

View Source
var File_lib_proto_api_annotations_proto protoreflect.FileDescriptor
View Source
var GroupVersion = runtime.GroupVersion{
	Group:   "",
	Version: "api",
}

Functions

This section is empty.

Types

type Authz

type Authz struct {

	// any_authenticated, if `true` any user that passed the authentication middleware can access the method.
	AnyAuthenticated bool `protobuf:"varint,1,opt,name=any_authenticated,json=anyAuthenticated,proto3" json:"any_authenticated,omitempty"`
	// authn_types is the authentication method used: "apikey", "internalkey" (any of them must mach).
	AuthnTypes []string `protobuf:"bytes,2,rep,name=authn_types,json=authnTypes,proto3" json:"authn_types,omitempty"`
	// roles of the authenticated user: "acme", "logforwarder" "xds" (any of them must match).
	Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
	// namespace_permission the minimum namespace permission a user must have.
	// eg: if NAMESPACE_PERMISSION_READ_ONLY, a user with write access can also access this namespace method.
	NamespacePermission NamespacePermission `` /* 148-byte string literal not displayed */
	// organisation_permission the minimum organisation permission a user must have.
	OrganisationPermission OrganisationPermission `` /* 160-byte string literal not displayed */
	// contains filtered or unexported fields
}

Authz defines authorizations required to access the method. A `OR` is applied between each property. eg: if roles is defined and namespace_permission too, a user who has a role in `roles` can access the method, also a user which has the required `namespace_permission` can access it too. They don't require to have both.

func (*Authz) Descriptor deprecated

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

Deprecated: Use Authz.ProtoReflect.Descriptor instead.

func (*Authz) GetAnyAuthenticated

func (x *Authz) GetAnyAuthenticated() bool

func (*Authz) GetAuthnTypes

func (x *Authz) GetAuthnTypes() []string

func (*Authz) GetNamespacePermission

func (x *Authz) GetNamespacePermission() NamespacePermission

func (*Authz) GetOrganisationPermission

func (x *Authz) GetOrganisationPermission() OrganisationPermission

func (*Authz) GetRoles

func (x *Authz) GetRoles() []string

func (*Authz) ProtoMessage

func (*Authz) ProtoMessage()

func (*Authz) ProtoReflect

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

func (*Authz) Reset

func (x *Authz) Reset()

func (*Authz) String

func (x *Authz) String() string

func (*Authz) Validate

func (m *Authz) Validate() error

Validate checks the field values on Authz 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 (*Authz) ValidateAll

func (m *Authz) ValidateAll() error

ValidateAll checks the field values on Authz 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 AuthzMultiError, or nil if none found.

type AuthzMultiError

type AuthzMultiError []error

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

func (AuthzMultiError) AllErrors

func (m AuthzMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (AuthzMultiError) Error

func (m AuthzMultiError) Error() string

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

type AuthzValidationError

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

AuthzValidationError is the validation error returned by Authz.Validate if the designated constraints aren't met.

func (AuthzValidationError) Cause

func (e AuthzValidationError) Cause() error

Cause function returns cause value.

func (AuthzValidationError) Error

func (e AuthzValidationError) Error() string

Error satisfies the builtin error interface

func (AuthzValidationError) ErrorName

func (e AuthzValidationError) ErrorName() string

ErrorName returns error name.

func (AuthzValidationError) Field

func (e AuthzValidationError) Field() string

Field function returns field value.

func (AuthzValidationError) Key

func (e AuthzValidationError) Key() bool

Key function returns key value.

func (AuthzValidationError) Reason

func (e AuthzValidationError) Reason() string

Reason function returns reason value.

type Client

type Client interface {
}

Client aggregate all gRPC services' clients

func NewGRPCClient

func NewGRPCClient(conn *grpc.ClientConn) Client

type MessageType

type MessageType int32
const (
	MessageType_MESSAGE_TYPE_UNSPECIFIED MessageType = 0
	MessageType_MESSAGE_TYPE_KIND        MessageType = 1
	MessageType_MESSAGE_TYPE_LIST        MessageType = 2
	MessageType_MESSAGE_TYPE_SPEC        MessageType = 3
	MessageType_MESSAGE_TYPE_STATUS      MessageType = 4
)

func (MessageType) Descriptor

func (MessageType) Enum

func (x MessageType) Enum() *MessageType

func (MessageType) EnumDescriptor deprecated

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

Deprecated: Use MessageType.Descriptor instead.

func (MessageType) MarshalText

func (e MessageType) MarshalText() (text []byte, err error)

func (MessageType) Number

func (x MessageType) Number() protoreflect.EnumNumber

func (MessageType) String

func (x MessageType) String() string

func (MessageType) Type

func (*MessageType) UnmarshalText

func (e *MessageType) UnmarshalText(text []byte) error

type NamespacePermission

type NamespacePermission int32

NamespacePermission namespace permission ordered from minimum to full access

const (
	NamespacePermission_NAMESPACE_PERMISSION_UNSPECIFIED NamespacePermission = 0
	NamespacePermission_NAMESPACE_PERMISSION_READ_ONLY   NamespacePermission = 1
	NamespacePermission_NAMESPACE_PERMISSION_WRITE       NamespacePermission = 2
)

func (NamespacePermission) Descriptor

func (NamespacePermission) Enum

func (NamespacePermission) EnumDescriptor deprecated

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

Deprecated: Use NamespacePermission.Descriptor instead.

func (NamespacePermission) MarshalText

func (e NamespacePermission) MarshalText() (text []byte, err error)

func (NamespacePermission) Number

func (NamespacePermission) String

func (x NamespacePermission) String() string

func (NamespacePermission) Type

func (*NamespacePermission) UnmarshalText

func (e *NamespacePermission) UnmarshalText(text []byte) error

type OrganisationPermission

type OrganisationPermission int32
const (
	OrganisationPermission_ORGANISATION_PERMISSION_UNSPECIFIED OrganisationPermission = 0
	OrganisationPermission_ORGANISATION_PERMISSION_OWNER       OrganisationPermission = 1
)

func (OrganisationPermission) Descriptor

func (OrganisationPermission) Enum

func (OrganisationPermission) EnumDescriptor deprecated

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

Deprecated: Use OrganisationPermission.Descriptor instead.

func (OrganisationPermission) MarshalText

func (e OrganisationPermission) MarshalText() (text []byte, err error)

func (OrganisationPermission) Number

func (OrganisationPermission) String

func (x OrganisationPermission) String() string

func (OrganisationPermission) Type

func (*OrganisationPermission) UnmarshalText

func (e *OrganisationPermission) UnmarshalText(text []byte) error

type RusMessage

type RusMessage struct {
	Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=api.MessageType" json:"type,omitempty"`
	// collection_itself true when the object is the Collection itself
	// this means there can be only one object of this kind in the
	// collection, and it must be named like the collection itself.
	CollectionItself bool `protobuf:"varint,2,opt,name=collection_itself,json=collectionItself,proto3" json:"collection_itself,omitempty"`
	// contains filtered or unexported fields
}

func (*RusMessage) Descriptor deprecated

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

Deprecated: Use RusMessage.ProtoReflect.Descriptor instead.

func (*RusMessage) GetCollectionItself

func (x *RusMessage) GetCollectionItself() bool

func (*RusMessage) GetType

func (x *RusMessage) GetType() MessageType

func (*RusMessage) ProtoMessage

func (*RusMessage) ProtoMessage()

func (*RusMessage) ProtoReflect

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

func (*RusMessage) Reset

func (x *RusMessage) Reset()

func (*RusMessage) String

func (x *RusMessage) String() string

func (*RusMessage) Validate

func (m *RusMessage) Validate() error

Validate checks the field values on RusMessage 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 (*RusMessage) ValidateAll

func (m *RusMessage) ValidateAll() error

ValidateAll checks the field values on RusMessage 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 RusMessageMultiError, or nil if none found.

type RusMessageMultiError

type RusMessageMultiError []error

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

func (RusMessageMultiError) AllErrors

func (m RusMessageMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RusMessageMultiError) Error

func (m RusMessageMultiError) Error() string

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

type RusMessageValidationError

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

RusMessageValidationError is the validation error returned by RusMessage.Validate if the designated constraints aren't met.

func (RusMessageValidationError) Cause

func (e RusMessageValidationError) Cause() error

Cause function returns cause value.

func (RusMessageValidationError) Error

Error satisfies the builtin error interface

func (RusMessageValidationError) ErrorName

func (e RusMessageValidationError) ErrorName() string

ErrorName returns error name.

func (RusMessageValidationError) Field

Field function returns field value.

func (RusMessageValidationError) Key

Key function returns key value.

func (RusMessageValidationError) Reason

func (e RusMessageValidationError) Reason() string

Reason function returns reason value.

type RusMethod

type RusMethod struct {
	Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Authz  *Authz `protobuf:"bytes,3,opt,name=authz,proto3" json:"authz,omitempty"`
	// contains filtered or unexported fields
}

func (*RusMethod) Descriptor deprecated

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

Deprecated: Use RusMethod.ProtoReflect.Descriptor instead.

func (*RusMethod) GetAuthz

func (x *RusMethod) GetAuthz() *Authz

func (*RusMethod) GetMethod

func (x *RusMethod) GetMethod() string

func (*RusMethod) ProtoMessage

func (*RusMethod) ProtoMessage()

func (*RusMethod) ProtoReflect

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

func (*RusMethod) Reset

func (x *RusMethod) Reset()

func (*RusMethod) String

func (x *RusMethod) String() string

func (*RusMethod) Validate

func (m *RusMethod) Validate() error

Validate checks the field values on RusMethod 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 (*RusMethod) ValidateAll

func (m *RusMethod) ValidateAll() error

ValidateAll checks the field values on RusMethod 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 RusMethodMultiError, or nil if none found.

type RusMethodMultiError

type RusMethodMultiError []error

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

func (RusMethodMultiError) AllErrors

func (m RusMethodMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RusMethodMultiError) Error

func (m RusMethodMultiError) Error() string

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

type RusMethodValidationError

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

RusMethodValidationError is the validation error returned by RusMethod.Validate if the designated constraints aren't met.

func (RusMethodValidationError) Cause

func (e RusMethodValidationError) Cause() error

Cause function returns cause value.

func (RusMethodValidationError) Error

func (e RusMethodValidationError) Error() string

Error satisfies the builtin error interface

func (RusMethodValidationError) ErrorName

func (e RusMethodValidationError) ErrorName() string

ErrorName returns error name.

func (RusMethodValidationError) Field

func (e RusMethodValidationError) Field() string

Field function returns field value.

func (RusMethodValidationError) Key

Key function returns key value.

func (RusMethodValidationError) Reason

func (e RusMethodValidationError) Reason() string

Reason function returns reason value.

type RusService

type RusService struct {
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

func (*RusService) Descriptor deprecated

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

Deprecated: Use RusService.ProtoReflect.Descriptor instead.

func (*RusService) GetKind

func (x *RusService) GetKind() string

func (*RusService) ProtoMessage

func (*RusService) ProtoMessage()

func (*RusService) ProtoReflect

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

func (*RusService) Reset

func (x *RusService) Reset()

func (*RusService) String

func (x *RusService) String() string

func (*RusService) Validate

func (m *RusService) Validate() error

Validate checks the field values on RusService 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 (*RusService) ValidateAll

func (m *RusService) ValidateAll() error

ValidateAll checks the field values on RusService 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 RusServiceMultiError, or nil if none found.

type RusServiceMultiError

type RusServiceMultiError []error

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

func (RusServiceMultiError) AllErrors

func (m RusServiceMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RusServiceMultiError) Error

func (m RusServiceMultiError) Error() string

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

type RusServiceValidationError

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

RusServiceValidationError is the validation error returned by RusService.Validate if the designated constraints aren't met.

func (RusServiceValidationError) Cause

func (e RusServiceValidationError) Cause() error

Cause function returns cause value.

func (RusServiceValidationError) Error

Error satisfies the builtin error interface

func (RusServiceValidationError) ErrorName

func (e RusServiceValidationError) ErrorName() string

ErrorName returns error name.

func (RusServiceValidationError) Field

Field function returns field value.

func (RusServiceValidationError) Key

Key function returns key value.

func (RusServiceValidationError) Reason

func (e RusServiceValidationError) Reason() string

Reason function returns reason value.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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