api_proto

package
v0.0.0-...-ba64992 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PayloadType_name = map[int32]string{
		0: "kPayloadUnknown",
		1: "kPayloadRequest",
		2: "kPayloadResponse",
		3: "kPayloadTopicNotify",
	}
	PayloadType_value = map[string]int32{
		"kPayloadUnknown":     0,
		"kPayloadRequest":     1,
		"kPayloadResponse":    2,
		"kPayloadTopicNotify": 3,
	}
)

Enum value maps for PayloadType.

View Source
var (
	RequestMethod_name = map[int32]string{
		0: "kRequestUnknown",
		1: "kRequestTopicSubscribe",
		2: "kRequestTopicUnsubscribe",
		3: "kRequestStartNotification",
		4: "kRequestFetchNotifications",
		5: "kRequestMarkNotifications",
	}
	RequestMethod_value = map[string]int32{
		"kRequestUnknown":            0,
		"kRequestTopicSubscribe":     1,
		"kRequestTopicUnsubscribe":   2,
		"kRequestStartNotification":  3,
		"kRequestFetchNotifications": 4,
		"kRequestMarkNotifications":  5,
	}
)

Enum value maps for RequestMethod.

View Source
var ApiPayloadCodec = websocket.Codec{payloadMarshal, payloadUnmarshal}

Functions

This section is empty.

Types

type FetchNotificationsRequest

type FetchNotificationsRequest struct {
	ContinueToken string `protobuf:"bytes,1,opt,name=continue_token,json=continueToken,proto3" json:"continue_token,omitempty"`
	Limits        int32  `protobuf:"varint,2,opt,name=limits,proto3" json:"limits,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchNotificationsRequest) Descriptor deprecated

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

Deprecated: Use FetchNotificationsRequest.ProtoReflect.Descriptor instead.

func (*FetchNotificationsRequest) GetContinueToken

func (x *FetchNotificationsRequest) GetContinueToken() string

func (*FetchNotificationsRequest) GetLimits

func (x *FetchNotificationsRequest) GetLimits() int32

func (*FetchNotificationsRequest) ProtoMessage

func (*FetchNotificationsRequest) ProtoMessage()

func (*FetchNotificationsRequest) ProtoReflect

func (*FetchNotificationsRequest) Reset

func (x *FetchNotificationsRequest) Reset()

func (*FetchNotificationsRequest) String

func (x *FetchNotificationsRequest) String() string

type FetchNotificationsResponse

type FetchNotificationsResponse struct {
	ContinueToken string   `protobuf:"bytes,1,opt,name=continue_token,json=continueToken,proto3" json:"continue_token,omitempty"`
	Item          []string `protobuf:"bytes,2,rep,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*FetchNotificationsResponse) Descriptor deprecated

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

Deprecated: Use FetchNotificationsResponse.ProtoReflect.Descriptor instead.

func (*FetchNotificationsResponse) GetContinueToken

func (x *FetchNotificationsResponse) GetContinueToken() string

func (*FetchNotificationsResponse) GetItem

func (x *FetchNotificationsResponse) GetItem() []string

func (*FetchNotificationsResponse) ProtoMessage

func (*FetchNotificationsResponse) ProtoMessage()

func (*FetchNotificationsResponse) ProtoReflect

func (*FetchNotificationsResponse) Reset

func (x *FetchNotificationsResponse) Reset()

func (*FetchNotificationsResponse) String

func (x *FetchNotificationsResponse) String() string

type MarkNotificationsRequest

type MarkNotificationsRequest struct {
	MarkReadIds   []string `protobuf:"bytes,1,rep,name=mark_read_ids,json=markReadIds,proto3" json:"mark_read_ids,omitempty"`
	UnmarkReadIds []string `protobuf:"bytes,2,rep,name=unmark_read_ids,json=unmarkReadIds,proto3" json:"unmark_read_ids,omitempty"`
	DeleteIds     []string `protobuf:"bytes,3,rep,name=delete_ids,json=deleteIds,proto3" json:"delete_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*MarkNotificationsRequest) Descriptor deprecated

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

Deprecated: Use MarkNotificationsRequest.ProtoReflect.Descriptor instead.

func (*MarkNotificationsRequest) GetDeleteIds

func (x *MarkNotificationsRequest) GetDeleteIds() []string

func (*MarkNotificationsRequest) GetMarkReadIds

func (x *MarkNotificationsRequest) GetMarkReadIds() []string

func (*MarkNotificationsRequest) GetUnmarkReadIds

func (x *MarkNotificationsRequest) GetUnmarkReadIds() []string

func (*MarkNotificationsRequest) ProtoMessage

func (*MarkNotificationsRequest) ProtoMessage()

func (*MarkNotificationsRequest) ProtoReflect

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

func (*MarkNotificationsRequest) Reset

func (x *MarkNotificationsRequest) Reset()

func (*MarkNotificationsRequest) String

func (x *MarkNotificationsRequest) String() string

type Payload

type Payload struct {
	Type          PayloadType   `protobuf:"varint,1,opt,name=type,proto3,enum=io.opennoty.api.proto.PayloadType" json:"type,omitempty"`
	RequestId     []byte        `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // 16 byte binary (uuid)
	RequestMethod RequestMethod ``                                                                                         /* 142-byte string literal not displayed */
	ResponseOk    bool          `protobuf:"varint,10,opt,name=response_ok,json=responseOk,proto3" json:"response_ok,omitempty"`
	// kPayloadTopicNotify: R
	// kRequestTopicSubscribe: R
	// kRequestTopicUnsubscribe: W
	// kRequestStartNotification: R
	SubscribeKey string `protobuf:"bytes,30,opt,name=subscribe_key,json=subscribeKey,proto3" json:"subscribe_key,omitempty"`
	// kPayloadTopicNotify
	TopicName string `protobuf:"bytes,31,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty"`
	TopicData []byte `protobuf:"bytes,32,opt,name=topic_data,json=topicData,proto3" json:"topic_data,omitempty"`
	// kRequestFetchNotifications: R/W
	FetchNotificationRequest  *FetchNotificationsRequest  `` /* 136-byte string literal not displayed */
	FetchNotificationResponse *FetchNotificationsResponse `` /* 139-byte string literal not displayed */
	MarkNotificationsRequest  *MarkNotificationsRequest   `` /* 136-byte string literal not displayed */
	// contains filtered or unexported fields
}

func NewRequestPayload

func NewRequestPayload(requestMethod RequestMethod) *Payload

func NewResponsePayload

func NewResponsePayload(requestPayload *Payload) *Payload

func (*Payload) Descriptor deprecated

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

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetFetchNotificationRequest

func (x *Payload) GetFetchNotificationRequest() *FetchNotificationsRequest

func (*Payload) GetFetchNotificationResponse

func (x *Payload) GetFetchNotificationResponse() *FetchNotificationsResponse

func (*Payload) GetMarkNotificationsRequest

func (x *Payload) GetMarkNotificationsRequest() *MarkNotificationsRequest

func (*Payload) GetRequestId

func (x *Payload) GetRequestId() []byte

func (*Payload) GetRequestMethod

func (x *Payload) GetRequestMethod() RequestMethod

func (*Payload) GetResponseOk

func (x *Payload) GetResponseOk() bool

func (*Payload) GetSubscribeKey

func (x *Payload) GetSubscribeKey() string

func (*Payload) GetTopicData

func (x *Payload) GetTopicData() []byte

func (*Payload) GetTopicName

func (x *Payload) GetTopicName() string

func (*Payload) GetType

func (x *Payload) GetType() PayloadType

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

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

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

type PayloadType

type PayloadType int32
const (
	PayloadType_kPayloadUnknown     PayloadType = 0
	PayloadType_kPayloadRequest     PayloadType = 1
	PayloadType_kPayloadResponse    PayloadType = 2
	PayloadType_kPayloadTopicNotify PayloadType = 3
)

func (PayloadType) Descriptor

func (PayloadType) Enum

func (x PayloadType) Enum() *PayloadType

func (PayloadType) EnumDescriptor deprecated

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

Deprecated: Use PayloadType.Descriptor instead.

func (PayloadType) Number

func (x PayloadType) Number() protoreflect.EnumNumber

func (PayloadType) String

func (x PayloadType) String() string

func (PayloadType) Type

type RequestMethod

type RequestMethod int32
const (
	RequestMethod_kRequestUnknown            RequestMethod = 0
	RequestMethod_kRequestTopicSubscribe     RequestMethod = 1
	RequestMethod_kRequestTopicUnsubscribe   RequestMethod = 2
	RequestMethod_kRequestStartNotification  RequestMethod = 3
	RequestMethod_kRequestFetchNotifications RequestMethod = 4
	RequestMethod_kRequestMarkNotifications  RequestMethod = 5
)

func (RequestMethod) Descriptor

func (RequestMethod) Enum

func (x RequestMethod) Enum() *RequestMethod

func (RequestMethod) EnumDescriptor deprecated

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

Deprecated: Use RequestMethod.Descriptor instead.

func (RequestMethod) Number

func (RequestMethod) String

func (x RequestMethod) String() string

func (RequestMethod) Type

Jump to

Keyboard shortcuts

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