channelsv2

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package channelsv2 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var ChannelService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sift.channels.v2.ChannelService",
	HandlerType: (*ChannelServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetChannel",
			Handler:    _ChannelService_GetChannel_Handler,
		},
		{
			MethodName: "ListChannels",
			Handler:    _ChannelService_ListChannels_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sift/channels/v2/channels.proto",
}

ChannelService_ServiceDesc is the grpc.ServiceDesc for ChannelService 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_sift_channels_v2_channels_proto protoreflect.FileDescriptor

Functions

func RegisterChannelServiceHandler

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

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

func RegisterChannelServiceHandlerClient

func RegisterChannelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChannelServiceClient) error

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

func RegisterChannelServiceHandlerFromEndpoint

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

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

func RegisterChannelServiceHandlerServer

func RegisterChannelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChannelServiceServer) error

RegisterChannelServiceHandlerServer registers the http handlers for service ChannelService to "mux". UnaryRPC :call ChannelServiceServer 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 RegisterChannelServiceHandlerFromEndpoint instead.

func RegisterChannelServiceServer

func RegisterChannelServiceServer(s grpc.ServiceRegistrar, srv ChannelServiceServer)

Types

type Channel

type Channel struct {
	ChannelId        string                       `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	Name             string                       `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Component        string                       `protobuf:"bytes,3,opt,name=component,proto3" json:"component,omitempty"`
	AssetId          string                       `protobuf:"bytes,4,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	Description      string                       `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	UnitId           string                       `protobuf:"bytes,6,opt,name=unit_id,json=unitId,proto3" json:"unit_id,omitempty"`
	CreatedDate      *timestamppb.Timestamp       `protobuf:"bytes,7,opt,name=created_date,json=createdDate,proto3" json:"created_date,omitempty"`
	ModifiedDate     *timestamppb.Timestamp       `protobuf:"bytes,8,opt,name=modified_date,json=modifiedDate,proto3" json:"modified_date,omitempty"`
	CreatedByUserId  string                       `protobuf:"bytes,9,opt,name=created_by_user_id,json=createdByUserId,proto3" json:"created_by_user_id,omitempty"`
	ModifiedByUserId string                       `protobuf:"bytes,10,opt,name=modified_by_user_id,json=modifiedByUserId,proto3" json:"modified_by_user_id,omitempty"`
	OrganizationId   string                       `protobuf:"bytes,11,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
	DataType         v1.ChannelDataType           `` /* 128-byte string literal not displayed */
	EnumTypes        []*v1.ChannelEnumType        `protobuf:"bytes,13,rep,name=enum_types,json=enumTypes,proto3" json:"enum_types,omitempty"`
	BitFieldElements []*v1.ChannelBitFieldElement `protobuf:"bytes,14,rep,name=bit_field_elements,json=bitFieldElements,proto3" json:"bit_field_elements,omitempty"`
	// contains filtered or unexported fields
}

func (*Channel) CloneMessageVT

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

func (*Channel) CloneVT

func (m *Channel) CloneVT() *Channel

func (*Channel) Descriptor deprecated

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

Deprecated: Use Channel.ProtoReflect.Descriptor instead.

func (*Channel) EqualMessageVT

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

func (*Channel) EqualVT

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

func (*Channel) GetAssetId

func (x *Channel) GetAssetId() string

func (*Channel) GetBitFieldElements

func (x *Channel) GetBitFieldElements() []*v1.ChannelBitFieldElement

func (*Channel) GetChannelId

func (x *Channel) GetChannelId() string

func (*Channel) GetComponent

func (x *Channel) GetComponent() string

func (*Channel) GetCreatedByUserId

func (x *Channel) GetCreatedByUserId() string

func (*Channel) GetCreatedDate

func (x *Channel) GetCreatedDate() *timestamppb.Timestamp

func (*Channel) GetDataType

func (x *Channel) GetDataType() v1.ChannelDataType

func (*Channel) GetDescription

func (x *Channel) GetDescription() string

func (*Channel) GetEnumTypes

func (x *Channel) GetEnumTypes() []*v1.ChannelEnumType

func (*Channel) GetModifiedByUserId

func (x *Channel) GetModifiedByUserId() string

func (*Channel) GetModifiedDate

func (x *Channel) GetModifiedDate() *timestamppb.Timestamp

func (*Channel) GetName

func (x *Channel) GetName() string

func (*Channel) GetOrganizationId

func (x *Channel) GetOrganizationId() string

func (*Channel) GetUnitId

func (x *Channel) GetUnitId() string

func (*Channel) MarshalToSizedBufferVT

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

func (*Channel) MarshalToSizedBufferVTStrict

func (m *Channel) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*Channel) MarshalToVT

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

func (*Channel) MarshalToVTStrict

func (m *Channel) MarshalToVTStrict(dAtA []byte) (int, error)

func (*Channel) MarshalVT

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

func (*Channel) MarshalVTStrict

func (m *Channel) MarshalVTStrict() (dAtA []byte, err error)

func (*Channel) ProtoMessage

func (*Channel) ProtoMessage()

func (*Channel) ProtoReflect

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

func (*Channel) Reset

func (x *Channel) Reset()

func (*Channel) SizeVT

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

func (*Channel) String

func (x *Channel) String() string

func (*Channel) UnmarshalVT

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

func (*Channel) UnmarshalVTUnsafe

func (m *Channel) UnmarshalVTUnsafe(dAtA []byte) error

type ChannelServiceClient

type ChannelServiceClient interface {
	// Retrieve a channel
	GetChannel(ctx context.Context, in *GetChannelRequest, opts ...grpc.CallOption) (*GetChannelResponse, error)
	// Retrieve channels using an optional filter.
	ListChannels(ctx context.Context, in *ListChannelsRequest, opts ...grpc.CallOption) (*ListChannelsResponse, error)
}

ChannelServiceClient is the client API for ChannelService 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 ChannelServiceServer

type ChannelServiceServer interface {
	// Retrieve a channel
	GetChannel(context.Context, *GetChannelRequest) (*GetChannelResponse, error)
	// Retrieve channels using an optional filter.
	ListChannels(context.Context, *ListChannelsRequest) (*ListChannelsResponse, error)
	// contains filtered or unexported methods
}

ChannelServiceServer is the server API for ChannelService service. All implementations must embed UnimplementedChannelServiceServer for forward compatibility

type GetChannelRequest

type GetChannelRequest struct {
	ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

The request for a call to `ChannelService_GetChannel`.

func (*GetChannelRequest) CloneMessageVT

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

func (*GetChannelRequest) CloneVT

func (m *GetChannelRequest) CloneVT() *GetChannelRequest

func (*GetChannelRequest) Descriptor deprecated

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

Deprecated: Use GetChannelRequest.ProtoReflect.Descriptor instead.

func (*GetChannelRequest) EqualMessageVT

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

func (*GetChannelRequest) EqualVT

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

func (*GetChannelRequest) GetChannelId

func (x *GetChannelRequest) GetChannelId() string

func (*GetChannelRequest) MarshalToSizedBufferVT

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

func (*GetChannelRequest) MarshalToSizedBufferVTStrict

func (m *GetChannelRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*GetChannelRequest) MarshalToVT

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

func (*GetChannelRequest) MarshalToVTStrict

func (m *GetChannelRequest) MarshalToVTStrict(dAtA []byte) (int, error)

func (*GetChannelRequest) MarshalVT

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

func (*GetChannelRequest) MarshalVTStrict

func (m *GetChannelRequest) MarshalVTStrict() (dAtA []byte, err error)

func (*GetChannelRequest) ProtoMessage

func (*GetChannelRequest) ProtoMessage()

func (*GetChannelRequest) ProtoReflect

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

func (*GetChannelRequest) Reset

func (x *GetChannelRequest) Reset()

func (*GetChannelRequest) SizeVT

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

func (*GetChannelRequest) String

func (x *GetChannelRequest) String() string

func (*GetChannelRequest) UnmarshalVT

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

func (*GetChannelRequest) UnmarshalVTUnsafe

func (m *GetChannelRequest) UnmarshalVTUnsafe(dAtA []byte) error

type GetChannelResponse

type GetChannelResponse struct {
	Channel *Channel `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
	// contains filtered or unexported fields
}

The response of a call to `ChannelService_GetChannel`.

func (*GetChannelResponse) CloneMessageVT

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

func (*GetChannelResponse) CloneVT

func (m *GetChannelResponse) CloneVT() *GetChannelResponse

func (*GetChannelResponse) Descriptor deprecated

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

Deprecated: Use GetChannelResponse.ProtoReflect.Descriptor instead.

func (*GetChannelResponse) EqualMessageVT

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

func (*GetChannelResponse) EqualVT

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

func (*GetChannelResponse) GetChannel

func (x *GetChannelResponse) GetChannel() *Channel

func (*GetChannelResponse) MarshalToSizedBufferVT

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

func (*GetChannelResponse) MarshalToSizedBufferVTStrict

func (m *GetChannelResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*GetChannelResponse) MarshalToVT

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

func (*GetChannelResponse) MarshalToVTStrict

func (m *GetChannelResponse) MarshalToVTStrict(dAtA []byte) (int, error)

func (*GetChannelResponse) MarshalVT

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

func (*GetChannelResponse) MarshalVTStrict

func (m *GetChannelResponse) MarshalVTStrict() (dAtA []byte, err error)

func (*GetChannelResponse) ProtoMessage

func (*GetChannelResponse) ProtoMessage()

func (*GetChannelResponse) ProtoReflect

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

func (*GetChannelResponse) Reset

func (x *GetChannelResponse) Reset()

func (*GetChannelResponse) SizeVT

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

func (*GetChannelResponse) String

func (x *GetChannelResponse) String() string

func (*GetChannelResponse) UnmarshalVT

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

func (*GetChannelResponse) UnmarshalVTUnsafe

func (m *GetChannelResponse) UnmarshalVTUnsafe(dAtA []byte) error

type ListChannelsRequest

type ListChannelsRequest struct {

	// The maximum number of channels to return. The service may return fewer than this value.
	// If unspecified, at most 50 channels will be returned. The maximum value is 10,000; values above
	// 10,000 will be coerced to 10,000. Optional.
	PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// A page token, received from a previous `ListChannels` call.
	// Provide this to retrieve the subsequent page.
	// When paginating, all other parameters provided to `ListChannels` must match
	// the call that provided the page token. Optional.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string.
	// Available fields to filter by are `channel_id`, `asset_id`, `name`, `component`, `description`, `active`, `created_date`, and `modified_date`.
	// For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions).
	// For more information about the fields used for filtering, please refer to [this definition](/api/grpc/protocol_buffers/channels#channel). Optional.
	Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// This field is only required if your user belongs to multiple organizations.
	OrganizationId string `protobuf:"bytes,4,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
	// How to order the retrieved channels. Formatted as a comma-separated string i.e. "<field_name>[ desc],...".
	// Available fields to order_by are `created_date` and `modified_date`.
	// If left empty, items are ordered by `created_date` in ascending order (oldest-first).
	// For more information about the format of this field, read [this](https://google.aip.dev/132#ordering)
	// Example: "created_date desc,modified_date"
	OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
	// contains filtered or unexported fields
}

The request for a call to `ChannelService_ListChannels` to retrieve channels.

func (*ListChannelsRequest) CloneMessageVT

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

func (*ListChannelsRequest) CloneVT

func (*ListChannelsRequest) Descriptor deprecated

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

Deprecated: Use ListChannelsRequest.ProtoReflect.Descriptor instead.

func (*ListChannelsRequest) EqualMessageVT

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

func (*ListChannelsRequest) EqualVT

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

func (*ListChannelsRequest) GetFilter

func (x *ListChannelsRequest) GetFilter() string

func (*ListChannelsRequest) GetOrderBy

func (x *ListChannelsRequest) GetOrderBy() string

func (*ListChannelsRequest) GetOrganizationId

func (x *ListChannelsRequest) GetOrganizationId() string

func (*ListChannelsRequest) GetPageSize

func (x *ListChannelsRequest) GetPageSize() uint32

func (*ListChannelsRequest) GetPageToken

func (x *ListChannelsRequest) GetPageToken() string

func (*ListChannelsRequest) MarshalToSizedBufferVT

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

func (*ListChannelsRequest) MarshalToSizedBufferVTStrict

func (m *ListChannelsRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*ListChannelsRequest) MarshalToVT

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

func (*ListChannelsRequest) MarshalToVTStrict

func (m *ListChannelsRequest) MarshalToVTStrict(dAtA []byte) (int, error)

func (*ListChannelsRequest) MarshalVT

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

func (*ListChannelsRequest) MarshalVTStrict

func (m *ListChannelsRequest) MarshalVTStrict() (dAtA []byte, err error)

func (*ListChannelsRequest) ProtoMessage

func (*ListChannelsRequest) ProtoMessage()

func (*ListChannelsRequest) ProtoReflect

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

func (*ListChannelsRequest) Reset

func (x *ListChannelsRequest) Reset()

func (*ListChannelsRequest) SizeVT

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

func (*ListChannelsRequest) String

func (x *ListChannelsRequest) String() string

func (*ListChannelsRequest) UnmarshalVT

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

func (*ListChannelsRequest) UnmarshalVTUnsafe

func (m *ListChannelsRequest) UnmarshalVTUnsafe(dAtA []byte) error

type ListChannelsResponse

type ListChannelsResponse struct {
	Channels      []*Channel `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"`
	NextPageToken string     `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

The result of a call to `ChannelService_ListChannels`.

func (*ListChannelsResponse) CloneMessageVT

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

func (*ListChannelsResponse) CloneVT

func (*ListChannelsResponse) Descriptor deprecated

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

Deprecated: Use ListChannelsResponse.ProtoReflect.Descriptor instead.

func (*ListChannelsResponse) EqualMessageVT

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

func (*ListChannelsResponse) EqualVT

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

func (*ListChannelsResponse) GetChannels

func (x *ListChannelsResponse) GetChannels() []*Channel

func (*ListChannelsResponse) GetNextPageToken

func (x *ListChannelsResponse) GetNextPageToken() string

func (*ListChannelsResponse) MarshalToSizedBufferVT

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

func (*ListChannelsResponse) MarshalToSizedBufferVTStrict

func (m *ListChannelsResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*ListChannelsResponse) MarshalToVT

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

func (*ListChannelsResponse) MarshalToVTStrict

func (m *ListChannelsResponse) MarshalToVTStrict(dAtA []byte) (int, error)

func (*ListChannelsResponse) MarshalVT

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

func (*ListChannelsResponse) MarshalVTStrict

func (m *ListChannelsResponse) MarshalVTStrict() (dAtA []byte, err error)

func (*ListChannelsResponse) ProtoMessage

func (*ListChannelsResponse) ProtoMessage()

func (*ListChannelsResponse) ProtoReflect

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

func (*ListChannelsResponse) Reset

func (x *ListChannelsResponse) Reset()

func (*ListChannelsResponse) SizeVT

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

func (*ListChannelsResponse) String

func (x *ListChannelsResponse) String() string

func (*ListChannelsResponse) UnmarshalVT

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

func (*ListChannelsResponse) UnmarshalVTUnsafe

func (m *ListChannelsResponse) UnmarshalVTUnsafe(dAtA []byte) error

type UnimplementedChannelServiceServer

type UnimplementedChannelServiceServer struct {
}

UnimplementedChannelServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedChannelServiceServer) GetChannel

func (UnimplementedChannelServiceServer) ListChannels

type UnsafeChannelServiceServer

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

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

Jump to

Keyboard shortcuts

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