v1

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	Adapter_GetPage_FullMethodName = "/sgnl.adapter.v1.Adapter/GetPage"
)

Variables

View Source
var (
	AttributeType_name = map[int32]string{
		0: "ATTRIBUTE_TYPE_UNSPECIFIED",
		1: "ATTRIBUTE_TYPE_BOOL",
		2: "ATTRIBUTE_TYPE_DATE_TIME",
		3: "ATTRIBUTE_TYPE_DOUBLE",
		4: "ATTRIBUTE_TYPE_DURATION",
		5: "ATTRIBUTE_TYPE_INT64",
		6: "ATTRIBUTE_TYPE_STRING",
	}
	AttributeType_value = map[string]int32{
		"ATTRIBUTE_TYPE_UNSPECIFIED": 0,
		"ATTRIBUTE_TYPE_BOOL":        1,
		"ATTRIBUTE_TYPE_DATE_TIME":   2,
		"ATTRIBUTE_TYPE_DOUBLE":      3,
		"ATTRIBUTE_TYPE_DURATION":    4,
		"ATTRIBUTE_TYPE_INT64":       5,
		"ATTRIBUTE_TYPE_STRING":      6,
	}
)

Enum value maps for AttributeType.

View Source
var (
	ErrorCode_name = map[int32]string{
		0:  "ERROR_CODE_UNSPECIFIED",
		1:  "ERROR_CODE_INVALID_PAGE_REQUEST_CONFIG",
		2:  "ERROR_CODE_INVALID_DATASOURCE_CONFIG",
		3:  "ERROR_CODE_INVALID_DATASOURCE_AUTH",
		4:  "ERROR_CODE_INVALID_ENTITY_CONFIG",
		5:  "ERROR_CODE_UNKNOWN_ATTRIBUTE",
		6:  "ERROR_CODE_INVALID_ATTRIBUTE_TYPE",
		7:  "ERROR_CODE_DATASOURCE_PERMANENTLY_UNAVAILABLE",
		8:  "ERROR_CODE_DATASOURCE_TEMPORARILY_UNAVAILABLE",
		9:  "ERROR_CODE_DATASOURCE_AUTHENTICATION_FAILED",
		10: "ERROR_CODE_DATASOURCE_FAILED",
		11: "ERROR_CODE_INTERNAL",
		12: "ERROR_CODE_DATASOURCE_TOO_MANY_REQUESTS",
	}
	ErrorCode_value = map[string]int32{
		"ERROR_CODE_UNSPECIFIED":                        0,
		"ERROR_CODE_INVALID_PAGE_REQUEST_CONFIG":        1,
		"ERROR_CODE_INVALID_DATASOURCE_CONFIG":          2,
		"ERROR_CODE_INVALID_DATASOURCE_AUTH":            3,
		"ERROR_CODE_INVALID_ENTITY_CONFIG":              4,
		"ERROR_CODE_UNKNOWN_ATTRIBUTE":                  5,
		"ERROR_CODE_INVALID_ATTRIBUTE_TYPE":             6,
		"ERROR_CODE_DATASOURCE_PERMANENTLY_UNAVAILABLE": 7,
		"ERROR_CODE_DATASOURCE_TEMPORARILY_UNAVAILABLE": 8,
		"ERROR_CODE_DATASOURCE_AUTHENTICATION_FAILED":   9,
		"ERROR_CODE_DATASOURCE_FAILED":                  10,
		"ERROR_CODE_INTERNAL":                           11,
		"ERROR_CODE_DATASOURCE_TOO_MANY_REQUESTS":       12,
	}
)

Enum value maps for ErrorCode.

View Source
var Adapter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sgnl.adapter.v1.Adapter",
	HandlerType: (*AdapterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPage",
			Handler:    _Adapter_GetPage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "adapter/v1/adapter.proto",
}

Adapter_ServiceDesc is the grpc.ServiceDesc for Adapter 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 File_adapter_v1_adapter_proto protoreflect.FileDescriptor

Functions

func RegisterAdapterServer

func RegisterAdapterServer(s grpc.ServiceRegistrar, srv AdapterServer)

Types

type AdapterClient

type AdapterClient interface {
	// Pulls the next page of objects from a datasource for an entity and its child entities.
	GetPage(ctx context.Context, in *GetPageRequest, opts ...grpc.CallOption) (*GetPageResponse, error)
}

AdapterClient is the client API for Adapter 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 NewAdapterClient

func NewAdapterClient(cc grpc.ClientConnInterface) AdapterClient

type AdapterServer

type AdapterServer interface {
	// Pulls the next page of objects from a datasource for an entity and its child entities.
	GetPage(context.Context, *GetPageRequest) (*GetPageResponse, error)
	// contains filtered or unexported methods
}

AdapterServer is the server API for Adapter service. All implementations must embed UnimplementedAdapterServer for forward compatibility

type Attribute

type Attribute struct {

	// The unique identifier of the attribute.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The value(s) of the attribute.
	// May contain more than one value only if list is true.
	// If no value is given, the attribute's value is null.
	Values []*AttributeValue `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

An attribute of an object.

func (*Attribute) Descriptor deprecated

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

Deprecated: Use Attribute.ProtoReflect.Descriptor instead.

func (*Attribute) GetId

func (x *Attribute) GetId() string

func (*Attribute) GetValues

func (x *Attribute) GetValues() []*AttributeValue

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) ProtoReflect

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

func (*Attribute) Reset

func (x *Attribute) Reset()

func (*Attribute) String

func (x *Attribute) String() string

type AttributeConfig

type AttributeConfig struct {

	// The unique identifier of the attribute.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The adapter-specific name of the attribute in the entity.
	ExternalId string `protobuf:"bytes,2,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
	// The type of the ingested attribute's values.
	// Determines the field set in the returned AttributeValue for this
	// attribute.
	Type AttributeType `protobuf:"varint,3,opt,name=type,proto3,enum=sgnl.adapter.v1.AttributeType" json:"type,omitempty"`
	// Indicates whether the attribute contains a list of values vs. a single
	// value.
	List bool `protobuf:"varint,4,opt,name=list,proto3" json:"list,omitempty"`
	// Indicates whether the attribute represents a unique identifier for the entity.
	UniqueId bool `protobuf:"varint,5,opt,name=unique_id,json=uniqueId,proto3" json:"unique_id,omitempty"`
	// contains filtered or unexported fields
}

The configuration of an attribute to ingest.

func (*AttributeConfig) Descriptor deprecated

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

Deprecated: Use AttributeConfig.ProtoReflect.Descriptor instead.

func (*AttributeConfig) GetExternalId

func (x *AttributeConfig) GetExternalId() string

func (*AttributeConfig) GetId

func (x *AttributeConfig) GetId() string

func (*AttributeConfig) GetList

func (x *AttributeConfig) GetList() bool

func (*AttributeConfig) GetType

func (x *AttributeConfig) GetType() AttributeType

func (*AttributeConfig) GetUniqueId added in v0.8.3

func (x *AttributeConfig) GetUniqueId() bool

func (*AttributeConfig) ProtoMessage

func (*AttributeConfig) ProtoMessage()

func (*AttributeConfig) ProtoReflect

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

func (*AttributeConfig) Reset

func (x *AttributeConfig) Reset()

func (*AttributeConfig) String

func (x *AttributeConfig) String() string

type AttributeType

type AttributeType int32

The type of the values for an attribute.

const (
	// Invalid. Must not be used.
	AttributeType_ATTRIBUTE_TYPE_UNSPECIFIED AttributeType = 0
	// Boolean.
	AttributeType_ATTRIBUTE_TYPE_BOOL AttributeType = 1
	// Date or timestamp.
	AttributeType_ATTRIBUTE_TYPE_DATE_TIME AttributeType = 2
	// Double-precision float.
	AttributeType_ATTRIBUTE_TYPE_DOUBLE AttributeType = 3
	// Duration.
	AttributeType_ATTRIBUTE_TYPE_DURATION AttributeType = 4
	// Signed integer.
	AttributeType_ATTRIBUTE_TYPE_INT64 AttributeType = 5
	// String.
	AttributeType_ATTRIBUTE_TYPE_STRING AttributeType = 6
)

func (AttributeType) Descriptor

func (AttributeType) Enum

func (x AttributeType) Enum() *AttributeType

func (AttributeType) EnumDescriptor deprecated

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

Deprecated: Use AttributeType.Descriptor instead.

func (AttributeType) Number

func (AttributeType) String

func (x AttributeType) String() string

func (AttributeType) Type

type AttributeValue

type AttributeValue struct {

	// Types that are valid to be assigned to Value:
	//
	//	*AttributeValue_NullValue
	//	*AttributeValue_BoolValue
	//	*AttributeValue_DatetimeValue
	//	*AttributeValue_DoubleValue
	//	*AttributeValue_DurationValue
	//	*AttributeValue_Int64Value
	//	*AttributeValue_StringValue
	Value isAttributeValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

The value of an attribute.

func (*AttributeValue) Descriptor deprecated

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

Deprecated: Use AttributeValue.ProtoReflect.Descriptor instead.

func (*AttributeValue) GetBoolValue

func (x *AttributeValue) GetBoolValue() bool

func (*AttributeValue) GetDatetimeValue

func (x *AttributeValue) GetDatetimeValue() *DateTime

func (*AttributeValue) GetDoubleValue

func (x *AttributeValue) GetDoubleValue() float64

func (*AttributeValue) GetDurationValue

func (x *AttributeValue) GetDurationValue() *Duration

func (*AttributeValue) GetInt64Value

func (x *AttributeValue) GetInt64Value() int64

func (*AttributeValue) GetNullValue

func (x *AttributeValue) GetNullValue() *emptypb.Empty

func (*AttributeValue) GetStringValue

func (x *AttributeValue) GetStringValue() string

func (*AttributeValue) GetValue

func (x *AttributeValue) GetValue() isAttributeValue_Value

func (*AttributeValue) ProtoMessage

func (*AttributeValue) ProtoMessage()

func (*AttributeValue) ProtoReflect

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

func (*AttributeValue) Reset

func (x *AttributeValue) Reset()

func (*AttributeValue) String

func (x *AttributeValue) String() string

type AttributeValue_BoolValue

type AttributeValue_BoolValue struct {
	BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

type AttributeValue_DatetimeValue

type AttributeValue_DatetimeValue struct {
	DatetimeValue *DateTime `protobuf:"bytes,3,opt,name=datetime_value,json=datetimeValue,proto3,oneof"`
}

type AttributeValue_DoubleValue

type AttributeValue_DoubleValue struct {
	DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type AttributeValue_DurationValue

type AttributeValue_DurationValue struct {
	DurationValue *Duration `protobuf:"bytes,5,opt,name=duration_value,json=durationValue,proto3,oneof"`
}

type AttributeValue_Int64Value

type AttributeValue_Int64Value struct {
	Int64Value int64 `protobuf:"varint,6,opt,name=int64_value,json=int64Value,proto3,oneof"`
}

type AttributeValue_NullValue

type AttributeValue_NullValue struct {
	NullValue *emptypb.Empty `protobuf:"bytes,1,opt,name=null_value,json=nullValue,proto3,oneof"`
}

type AttributeValue_StringValue

type AttributeValue_StringValue struct {
	StringValue string `protobuf:"bytes,7,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type DatasourceAuthCredentials

type DatasourceAuthCredentials struct {

	// The credentials to authenticate with the datasource.
	// Exactly one of these fields must be set.
	//
	// Types that are valid to be assigned to AuthMechanism:
	//
	//	*DatasourceAuthCredentials_Basic_
	//	*DatasourceAuthCredentials_HttpAuthorization
	AuthMechanism isDatasourceAuthCredentials_AuthMechanism `protobuf_oneof:"auth_mechanism"`
	// contains filtered or unexported fields
}

Credentials to use to authenticate with a datasource.

func (*DatasourceAuthCredentials) Descriptor deprecated

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

Deprecated: Use DatasourceAuthCredentials.ProtoReflect.Descriptor instead.

func (*DatasourceAuthCredentials) GetAuthMechanism

func (x *DatasourceAuthCredentials) GetAuthMechanism() isDatasourceAuthCredentials_AuthMechanism

func (*DatasourceAuthCredentials) GetBasic

func (*DatasourceAuthCredentials) GetHttpAuthorization

func (x *DatasourceAuthCredentials) GetHttpAuthorization() string

func (*DatasourceAuthCredentials) ProtoMessage

func (*DatasourceAuthCredentials) ProtoMessage()

func (*DatasourceAuthCredentials) ProtoReflect

func (*DatasourceAuthCredentials) Reset

func (x *DatasourceAuthCredentials) Reset()

func (*DatasourceAuthCredentials) String

func (x *DatasourceAuthCredentials) String() string

type DatasourceAuthCredentials_Basic

type DatasourceAuthCredentials_Basic struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

Basic authentication credentials.

func (*DatasourceAuthCredentials_Basic) Descriptor deprecated

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

Deprecated: Use DatasourceAuthCredentials_Basic.ProtoReflect.Descriptor instead.

func (*DatasourceAuthCredentials_Basic) GetPassword

func (x *DatasourceAuthCredentials_Basic) GetPassword() string

func (*DatasourceAuthCredentials_Basic) GetUsername

func (x *DatasourceAuthCredentials_Basic) GetUsername() string

func (*DatasourceAuthCredentials_Basic) ProtoMessage

func (*DatasourceAuthCredentials_Basic) ProtoMessage()

func (*DatasourceAuthCredentials_Basic) ProtoReflect

func (*DatasourceAuthCredentials_Basic) Reset

func (*DatasourceAuthCredentials_Basic) String

type DatasourceAuthCredentials_Basic_

type DatasourceAuthCredentials_Basic_ struct {
	// Basic authentication credentials.
	Basic *DatasourceAuthCredentials_Basic `protobuf:"bytes,1,opt,name=basic,proto3,oneof"`
}

type DatasourceAuthCredentials_HttpAuthorization

type DatasourceAuthCredentials_HttpAuthorization struct {
	// Credentials to be sent in an HTTP Authorization header.
	// Must be prefixed with the scheme, e.g. "Bearer".
	HttpAuthorization string `protobuf:"bytes,2,opt,name=http_authorization,json=httpAuthorization,proto3,oneof"`
}

type DatasourceConfig

type DatasourceConfig struct {

	// The unique identifier of the datasource.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The adapter-specific configuration for the datasource.
	// Optional.
	Config []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// The address of the datasource.
	// Optional.
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// The credentials to use to authenticate with the datasource.
	// Optional.
	Auth *DatasourceAuthCredentials `protobuf:"bytes,4,opt,name=auth,proto3" json:"auth,omitempty"`
	// The type of the datasource. This can be used to route requests
	// on adapter deployments supporting multiple datasources.
	// If the adapter does not support this type, return an error.
	Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

The configuration of a datasource to get entity data from.

func (*DatasourceConfig) Descriptor deprecated

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

Deprecated: Use DatasourceConfig.ProtoReflect.Descriptor instead.

func (*DatasourceConfig) GetAddress

func (x *DatasourceConfig) GetAddress() string

func (*DatasourceConfig) GetAuth

func (*DatasourceConfig) GetConfig

func (x *DatasourceConfig) GetConfig() []byte

func (*DatasourceConfig) GetId

func (x *DatasourceConfig) GetId() string

func (*DatasourceConfig) GetType added in v0.4.1

func (x *DatasourceConfig) GetType() string

func (*DatasourceConfig) ProtoMessage

func (*DatasourceConfig) ProtoMessage()

func (*DatasourceConfig) ProtoReflect

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

func (*DatasourceConfig) Reset

func (x *DatasourceConfig) Reset()

func (*DatasourceConfig) String

func (x *DatasourceConfig) String() string

type DateTime

type DateTime struct {

	// The timestamp in the UTC timezone.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The local timezone as its number of seconds east of UTC.
	// UTC if zero (default).
	TimezoneOffset int32 `protobuf:"varint,2,opt,name=timezone_offset,json=timezoneOffset,proto3" json:"timezone_offset,omitempty"`
	// contains filtered or unexported fields
}

A date or timestamp.

func (*DateTime) Descriptor deprecated

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

Deprecated: Use DateTime.ProtoReflect.Descriptor instead.

func (*DateTime) GetTimestamp

func (x *DateTime) GetTimestamp() *timestamppb.Timestamp

func (*DateTime) GetTimezoneOffset

func (x *DateTime) GetTimezoneOffset() int32

func (*DateTime) ProtoMessage

func (*DateTime) ProtoMessage()

func (*DateTime) ProtoReflect

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

func (*DateTime) Reset

func (x *DateTime) Reset()

func (*DateTime) String

func (x *DateTime) String() string

type Duration added in v0.6.0

type Duration struct {

	// A duration as a number of seconds.
	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// A duration as a number of nanoseconds.
	Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
	// A duration as a number of months.
	Months int64 `protobuf:"varint,3,opt,name=months,proto3" json:"months,omitempty"`
	// A duration as a number of days.
	Days int64 `protobuf:"varint,4,opt,name=days,proto3" json:"days,omitempty"`
	// contains filtered or unexported fields
}

A duration, as the sum of all the fields' durations. Each field may be positive, zero, or negative. The seconds and nanos fields have the same tags as in google.protobuf.Duration for backward compatibility: when only seconds and/or nanos are set in the message, it is marshaled identically to google.protobuf.Duration. The months and days fields are additions supported in Neo4j durations.

func (*Duration) Descriptor deprecated added in v0.6.0

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

Deprecated: Use Duration.ProtoReflect.Descriptor instead.

func (*Duration) GetDays added in v0.6.0

func (x *Duration) GetDays() int64

func (*Duration) GetMonths added in v0.6.0

func (x *Duration) GetMonths() int64

func (*Duration) GetNanos added in v0.6.0

func (x *Duration) GetNanos() int32

func (*Duration) GetSeconds added in v0.6.0

func (x *Duration) GetSeconds() int64

func (*Duration) ProtoMessage added in v0.6.0

func (*Duration) ProtoMessage()

func (*Duration) ProtoReflect added in v0.6.0

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

func (*Duration) Reset added in v0.6.0

func (x *Duration) Reset()

func (*Duration) String added in v0.6.0

func (x *Duration) String() string

type EntityConfig

type EntityConfig struct {

	// The unique identifier of the entity.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The adapter-specific name of the entity in the datasource.
	ExternalId string `protobuf:"bytes,2,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
	// Indicates whether the objects are ordered by ID, i.e. whether the
	// response must contain objects ordered by monotonically increasing IDs for
	// the entity.
	Ordered bool `protobuf:"varint,3,opt,name=ordered,proto3" json:"ordered,omitempty"`
	// The configuration of the attributes to return for the entity.
	Attributes []*AttributeConfig `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
	// The configuration of the entities that are children of the entity
	// to return together with the entity.
	ChildEntities []*EntityConfig `protobuf:"bytes,5,rep,name=child_entities,json=childEntities,proto3" json:"child_entities,omitempty"`
	// contains filtered or unexported fields
}

The configuration of an entity to get data from.

func (*EntityConfig) Descriptor deprecated

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

Deprecated: Use EntityConfig.ProtoReflect.Descriptor instead.

func (*EntityConfig) GetAttributes

func (x *EntityConfig) GetAttributes() []*AttributeConfig

func (*EntityConfig) GetChildEntities

func (x *EntityConfig) GetChildEntities() []*EntityConfig

func (*EntityConfig) GetExternalId

func (x *EntityConfig) GetExternalId() string

func (*EntityConfig) GetId

func (x *EntityConfig) GetId() string

func (*EntityConfig) GetOrdered

func (x *EntityConfig) GetOrdered() bool

func (*EntityConfig) ProtoMessage

func (*EntityConfig) ProtoMessage()

func (*EntityConfig) ProtoReflect

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

func (*EntityConfig) Reset

func (x *EntityConfig) Reset()

func (*EntityConfig) String

func (x *EntityConfig) String() string

type EntityObjects

type EntityObjects struct {

	// The ID of the entity the objects belong to.
	EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
	// The set of objects.
	Objects []*Object `protobuf:"bytes,2,rep,name=objects,proto3" json:"objects,omitempty"`
	// contains filtered or unexported fields
}

A set of objects belonging to the same entity.

func (*EntityObjects) Descriptor deprecated

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

Deprecated: Use EntityObjects.ProtoReflect.Descriptor instead.

func (*EntityObjects) GetEntityId

func (x *EntityObjects) GetEntityId() string

func (*EntityObjects) GetObjects

func (x *EntityObjects) GetObjects() []*Object

func (*EntityObjects) ProtoMessage

func (*EntityObjects) ProtoMessage()

func (*EntityObjects) ProtoReflect

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

func (*EntityObjects) Reset

func (x *EntityObjects) Reset()

func (*EntityObjects) String

func (x *EntityObjects) String() string

type Error

type Error struct {

	// The error message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// The error code indicating the cause of the error.
	Code ErrorCode `protobuf:"varint,2,opt,name=code,proto3,enum=sgnl.adapter.v1.ErrorCode" json:"code,omitempty"`
	// Recommended minimal duration after which this request may be retried. Optional.
	RetryAfter *durationpb.Duration `protobuf:"bytes,3,opt,name=retry_after,json=retryAfter,proto3" json:"retry_after,omitempty"`
	// contains filtered or unexported fields
}

An error retrieving a page.

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() ErrorCode

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) GetRetryAfter

func (x *Error) GetRetryAfter() *durationpb.Duration

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type ErrorCode

type ErrorCode int32

Error codes indicating why the page request failed.

const (
	// Invalid. Must not be used.
	ErrorCode_ERROR_CODE_UNSPECIFIED ErrorCode = 0
	// Invalid page request config provided.
	ErrorCode_ERROR_CODE_INVALID_PAGE_REQUEST_CONFIG ErrorCode = 1
	// Invalid datasource config provided.
	ErrorCode_ERROR_CODE_INVALID_DATASOURCE_CONFIG ErrorCode = 2
	// Invalid datasource auth provided.
	ErrorCode_ERROR_CODE_INVALID_DATASOURCE_AUTH ErrorCode = 3
	// Invalid entity config provided.
	ErrorCode_ERROR_CODE_INVALID_ENTITY_CONFIG ErrorCode = 4
	// Unknown attribute provided in request.
	ErrorCode_ERROR_CODE_UNKNOWN_ATTRIBUTE ErrorCode = 5
	// Attribute returned from datasource does not match the expected type.
	ErrorCode_ERROR_CODE_INVALID_ATTRIBUTE_TYPE ErrorCode = 6
	// Datasource permanently unavailable.
	ErrorCode_ERROR_CODE_DATASOURCE_PERMANENTLY_UNAVAILABLE ErrorCode = 7
	// Datasource temporarily unavailable. Try again later.
	ErrorCode_ERROR_CODE_DATASOURCE_TEMPORARILY_UNAVAILABLE ErrorCode = 8
	// Failed to authenticate with datasource.
	ErrorCode_ERROR_CODE_DATASOURCE_AUTHENTICATION_FAILED ErrorCode = 9
	// Datasource failed unexpectedly.
	ErrorCode_ERROR_CODE_DATASOURCE_FAILED ErrorCode = 10
	// Unexpected failure due to the adapter implementation.
	ErrorCode_ERROR_CODE_INTERNAL ErrorCode = 11
	// Datasource received too many requests.
	ErrorCode_ERROR_CODE_DATASOURCE_TOO_MANY_REQUESTS ErrorCode = 12
)

func (ErrorCode) Descriptor

func (ErrorCode) Descriptor() protoreflect.EnumDescriptor

func (ErrorCode) Enum

func (x ErrorCode) Enum() *ErrorCode

func (ErrorCode) EnumDescriptor deprecated

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

Deprecated: Use ErrorCode.Descriptor instead.

func (ErrorCode) Number

func (x ErrorCode) Number() protoreflect.EnumNumber

func (ErrorCode) String

func (x ErrorCode) String() string

func (ErrorCode) Type

type GetPageRequest

type GetPageRequest struct {

	// The datasource the entity belongs to.
	Datasource *DatasourceConfig `protobuf:"bytes,1,opt,name=datasource,proto3" json:"datasource,omitempty"`
	// The entity to return a page of objects from.
	Entity *EntityConfig `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"`
	// The maximum number of objects to return from the entity.
	// The number of child_objects in each object is not limited:
	// all the objects from child entities are returned in each parent object.
	PageSize int64 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// The cursor that identifies the first object of the page to return, as
	// returned by the last call to GetPage for the entity.
	// If not set, return the first page for this entity.
	Cursor string `protobuf:"bytes,4,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A request for a page of data.

func (*GetPageRequest) Descriptor deprecated

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

Deprecated: Use GetPageRequest.ProtoReflect.Descriptor instead.

func (*GetPageRequest) GetCursor

func (x *GetPageRequest) GetCursor() string

func (*GetPageRequest) GetDatasource

func (x *GetPageRequest) GetDatasource() *DatasourceConfig

func (*GetPageRequest) GetEntity

func (x *GetPageRequest) GetEntity() *EntityConfig

func (*GetPageRequest) GetPageSize

func (x *GetPageRequest) GetPageSize() int64

func (*GetPageRequest) ProtoMessage

func (*GetPageRequest) ProtoMessage()

func (*GetPageRequest) ProtoReflect

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

func (*GetPageRequest) Reset

func (x *GetPageRequest) Reset()

func (*GetPageRequest) String

func (x *GetPageRequest) String() string

type GetPageResponse

type GetPageResponse struct {

	// Types that are valid to be assigned to Response:
	//
	//	*GetPageResponse_Success
	//	*GetPageResponse_Error
	Response isGetPageResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

A response containing a page of data.

func NewGetPageResponseError

func NewGetPageResponseError(err *Error) *GetPageResponse

NewGetPageResponseError returns a GetPageResponse with the given error.

func NewGetPageResponseSuccess

func NewGetPageResponseSuccess(page *Page) *GetPageResponse

NewGetPageResponseSuccess returns a GetPageResponse with the given page.

func (*GetPageResponse) Descriptor deprecated

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

Deprecated: Use GetPageResponse.ProtoReflect.Descriptor instead.

func (*GetPageResponse) GetError

func (x *GetPageResponse) GetError() *Error

func (*GetPageResponse) GetResponse

func (x *GetPageResponse) GetResponse() isGetPageResponse_Response

func (*GetPageResponse) GetSuccess

func (x *GetPageResponse) GetSuccess() *Page

func (*GetPageResponse) ProtoMessage

func (*GetPageResponse) ProtoMessage()

func (*GetPageResponse) ProtoReflect

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

func (*GetPageResponse) Reset

func (x *GetPageResponse) Reset()

func (*GetPageResponse) String

func (x *GetPageResponse) String() string

type GetPageResponse_Error

type GetPageResponse_Error struct {
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3,oneof"`
}

type GetPageResponse_Success

type GetPageResponse_Success struct {
	Success *Page `protobuf:"bytes,1,opt,name=success,proto3,oneof"`
}

type Object

type Object struct {

	// The object's attributes.
	Attributes []*Attribute `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"`
	// The child objects that belong to child entities of
	// the object's entity.
	ChildObjects []*EntityObjects `protobuf:"bytes,2,rep,name=child_objects,json=childObjects,proto3" json:"child_objects,omitempty"`
	// contains filtered or unexported fields
}

An object and its child objects.

func (*Object) Descriptor deprecated

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

Deprecated: Use Object.ProtoReflect.Descriptor instead.

func (*Object) GetAttributes

func (x *Object) GetAttributes() []*Attribute

func (*Object) GetChildObjects

func (x *Object) GetChildObjects() []*EntityObjects

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) ProtoReflect

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

func (*Object) Reset

func (x *Object) Reset()

func (*Object) String

func (x *Object) String() string

type Page

type Page struct {

	// The set of objects in the page returned by the datasource for the
	// requested entity.
	// Up to page_size objects may be returned in this set.
	Objects []*Object `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"`
	// The cursor that identifies the first object of the next page.
	// If not set, this page is the last page for this entity.
	NextCursor string `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
	// contains filtered or unexported fields
}

A page of objects returned from an entity.

func (*Page) Descriptor deprecated

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

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetNextCursor

func (x *Page) GetNextCursor() string

func (*Page) GetObjects

func (x *Page) GetObjects() []*Object

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) ProtoReflect

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

func (*Page) Reset

func (x *Page) Reset()

func (*Page) String

func (x *Page) String() string

type UnimplementedAdapterServer

type UnimplementedAdapterServer struct {
}

UnimplementedAdapterServer must be embedded to have forward compatible implementations.

func (UnimplementedAdapterServer) GetPage

type UnsafeAdapterServer

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

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

Jump to

Keyboard shortcuts

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