496 lines
13 KiB
Go
496 lines
13 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v6.33.2
|
|
// source: events.proto
|
|
|
|
package gen
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type EventType int32
|
|
|
|
const (
|
|
EventType_AUTHENTICATION EventType = 0
|
|
EventType_SLUG_CHANGE EventType = 1
|
|
EventType_SLUG_CHANGE_RESPONSE EventType = 2
|
|
)
|
|
|
|
// Enum value maps for EventType.
|
|
var (
|
|
EventType_name = map[int32]string{
|
|
0: "AUTHENTICATION",
|
|
1: "SLUG_CHANGE",
|
|
2: "SLUG_CHANGE_RESPONSE",
|
|
}
|
|
EventType_value = map[string]int32{
|
|
"AUTHENTICATION": 0,
|
|
"SLUG_CHANGE": 1,
|
|
"SLUG_CHANGE_RESPONSE": 2,
|
|
}
|
|
)
|
|
|
|
func (x EventType) Enum() *EventType {
|
|
p := new(EventType)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x EventType) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (EventType) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_events_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (EventType) Type() protoreflect.EnumType {
|
|
return &file_events_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x EventType) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use EventType.Descriptor instead.
|
|
func (EventType) EnumDescriptor() ([]byte, []int) {
|
|
return file_events_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type Controller struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Type EventType `protobuf:"varint,1,opt,name=type,proto3,enum=slug.EventType" json:"type,omitempty"`
|
|
// Types that are valid to be assigned to Payload:
|
|
//
|
|
// *Controller_SlugEvent
|
|
Payload isController_Payload `protobuf_oneof:"payload"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Controller) Reset() {
|
|
*x = Controller{}
|
|
mi := &file_events_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Controller) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Controller) ProtoMessage() {}
|
|
|
|
func (x *Controller) ProtoReflect() protoreflect.Message {
|
|
mi := &file_events_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Controller.ProtoReflect.Descriptor instead.
|
|
func (*Controller) Descriptor() ([]byte, []int) {
|
|
return file_events_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *Controller) GetType() EventType {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return EventType_AUTHENTICATION
|
|
}
|
|
|
|
func (x *Controller) GetPayload() isController_Payload {
|
|
if x != nil {
|
|
return x.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Controller) GetSlugEvent() *SlugChangeEvent {
|
|
if x != nil {
|
|
if x, ok := x.Payload.(*Controller_SlugEvent); ok {
|
|
return x.SlugEvent
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type isController_Payload interface {
|
|
isController_Payload()
|
|
}
|
|
|
|
type Controller_SlugEvent struct {
|
|
SlugEvent *SlugChangeEvent `protobuf:"bytes,11,opt,name=slug_event,json=slugEvent,proto3,oneof"`
|
|
}
|
|
|
|
func (*Controller_SlugEvent) isController_Payload() {}
|
|
|
|
type Client struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Type EventType `protobuf:"varint,1,opt,name=type,proto3,enum=slug.EventType" json:"type,omitempty"`
|
|
// Types that are valid to be assigned to Payload:
|
|
//
|
|
// *Client_AuthEvent
|
|
// *Client_SlugEventResponse
|
|
Payload isClient_Payload `protobuf_oneof:"payload"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Client) Reset() {
|
|
*x = Client{}
|
|
mi := &file_events_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Client) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Client) ProtoMessage() {}
|
|
|
|
func (x *Client) ProtoReflect() protoreflect.Message {
|
|
mi := &file_events_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Client.ProtoReflect.Descriptor instead.
|
|
func (*Client) Descriptor() ([]byte, []int) {
|
|
return file_events_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *Client) GetType() EventType {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return EventType_AUTHENTICATION
|
|
}
|
|
|
|
func (x *Client) GetPayload() isClient_Payload {
|
|
if x != nil {
|
|
return x.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Client) GetAuthEvent() *Authentication {
|
|
if x != nil {
|
|
if x, ok := x.Payload.(*Client_AuthEvent); ok {
|
|
return x.AuthEvent
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Client) GetSlugEventResponse() *SlugChangeEventResponse {
|
|
if x != nil {
|
|
if x, ok := x.Payload.(*Client_SlugEventResponse); ok {
|
|
return x.SlugEventResponse
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type isClient_Payload interface {
|
|
isClient_Payload()
|
|
}
|
|
|
|
type Client_AuthEvent struct {
|
|
AuthEvent *Authentication `protobuf:"bytes,10,opt,name=auth_event,json=authEvent,proto3,oneof"`
|
|
}
|
|
|
|
type Client_SlugEventResponse struct {
|
|
SlugEventResponse *SlugChangeEventResponse `protobuf:"bytes,11,opt,name=slug_event_response,json=slugEventResponse,proto3,oneof"`
|
|
}
|
|
|
|
func (*Client_AuthEvent) isClient_Payload() {}
|
|
|
|
func (*Client_SlugEventResponse) isClient_Payload() {}
|
|
|
|
type Authentication struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
AuthToken string `protobuf:"bytes,1,opt,name=auth_token,json=authToken,proto3" json:"auth_token,omitempty"`
|
|
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Authentication) Reset() {
|
|
*x = Authentication{}
|
|
mi := &file_events_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Authentication) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Authentication) ProtoMessage() {}
|
|
|
|
func (x *Authentication) ProtoReflect() protoreflect.Message {
|
|
mi := &file_events_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Authentication.ProtoReflect.Descriptor instead.
|
|
func (*Authentication) Descriptor() ([]byte, []int) {
|
|
return file_events_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *Authentication) GetAuthToken() string {
|
|
if x != nil {
|
|
return x.AuthToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Authentication) GetIdentity() string {
|
|
if x != nil {
|
|
return x.Identity
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SlugChangeEvent struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Old string `protobuf:"bytes,1,opt,name=old,proto3" json:"old,omitempty"`
|
|
New string `protobuf:"bytes,2,opt,name=new,proto3" json:"new,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SlugChangeEvent) Reset() {
|
|
*x = SlugChangeEvent{}
|
|
mi := &file_events_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SlugChangeEvent) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SlugChangeEvent) ProtoMessage() {}
|
|
|
|
func (x *SlugChangeEvent) ProtoReflect() protoreflect.Message {
|
|
mi := &file_events_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SlugChangeEvent.ProtoReflect.Descriptor instead.
|
|
func (*SlugChangeEvent) Descriptor() ([]byte, []int) {
|
|
return file_events_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *SlugChangeEvent) GetOld() string {
|
|
if x != nil {
|
|
return x.Old
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SlugChangeEvent) GetNew() string {
|
|
if x != nil {
|
|
return x.New
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SlugChangeEventResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SlugChangeEventResponse) Reset() {
|
|
*x = SlugChangeEventResponse{}
|
|
mi := &file_events_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SlugChangeEventResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SlugChangeEventResponse) ProtoMessage() {}
|
|
|
|
func (x *SlugChangeEventResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_events_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SlugChangeEventResponse.ProtoReflect.Descriptor instead.
|
|
func (*SlugChangeEventResponse) Descriptor() ([]byte, []int) {
|
|
return file_events_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *SlugChangeEventResponse) GetSuccess() bool {
|
|
if x != nil {
|
|
return x.Success
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *SlugChangeEventResponse) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_events_proto protoreflect.FileDescriptor
|
|
|
|
const file_events_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\fevents.proto\x12\x04slug\"t\n" +
|
|
"\n" +
|
|
"Controller\x12#\n" +
|
|
"\x04type\x18\x01 \x01(\x0e2\x0f.slug.EventTypeR\x04type\x126\n" +
|
|
"\n" +
|
|
"slug_event\x18\v \x01(\v2\x15.slug.SlugChangeEventH\x00R\tslugEventB\t\n" +
|
|
"\apayload\"\xc0\x01\n" +
|
|
"\x06Client\x12#\n" +
|
|
"\x04type\x18\x01 \x01(\x0e2\x0f.slug.EventTypeR\x04type\x125\n" +
|
|
"\n" +
|
|
"auth_event\x18\n" +
|
|
" \x01(\v2\x14.slug.AuthenticationH\x00R\tauthEvent\x12O\n" +
|
|
"\x13slug_event_response\x18\v \x01(\v2\x1d.slug.SlugChangeEventResponseH\x00R\x11slugEventResponseB\t\n" +
|
|
"\apayload\"K\n" +
|
|
"\x0eAuthentication\x12\x1d\n" +
|
|
"\n" +
|
|
"auth_token\x18\x01 \x01(\tR\tauthToken\x12\x1a\n" +
|
|
"\bidentity\x18\x02 \x01(\tR\bidentity\"5\n" +
|
|
"\x0fSlugChangeEvent\x12\x10\n" +
|
|
"\x03old\x18\x01 \x01(\tR\x03old\x12\x10\n" +
|
|
"\x03new\x18\x02 \x01(\tR\x03new\"M\n" +
|
|
"\x17SlugChangeEventResponse\x12\x18\n" +
|
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" +
|
|
"\amessage\x18\x02 \x01(\tR\amessage*J\n" +
|
|
"\tEventType\x12\x12\n" +
|
|
"\x0eAUTHENTICATION\x10\x00\x12\x0f\n" +
|
|
"\vSLUG_CHANGE\x10\x01\x12\x18\n" +
|
|
"\x14SLUG_CHANGE_RESPONSE\x10\x022?\n" +
|
|
"\fEventService\x12/\n" +
|
|
"\tSubscribe\x12\f.slug.Client\x1a\x10.slug.Controller(\x010\x01B\aZ\x05./genb\x06proto3"
|
|
|
|
var (
|
|
file_events_proto_rawDescOnce sync.Once
|
|
file_events_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_events_proto_rawDescGZIP() []byte {
|
|
file_events_proto_rawDescOnce.Do(func() {
|
|
file_events_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_events_proto_rawDesc), len(file_events_proto_rawDesc)))
|
|
})
|
|
return file_events_proto_rawDescData
|
|
}
|
|
|
|
var file_events_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_events_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
|
var file_events_proto_goTypes = []any{
|
|
(EventType)(0), // 0: slug.EventType
|
|
(*Controller)(nil), // 1: slug.Controller
|
|
(*Client)(nil), // 2: slug.Client
|
|
(*Authentication)(nil), // 3: slug.Authentication
|
|
(*SlugChangeEvent)(nil), // 4: slug.SlugChangeEvent
|
|
(*SlugChangeEventResponse)(nil), // 5: slug.SlugChangeEventResponse
|
|
}
|
|
var file_events_proto_depIdxs = []int32{
|
|
0, // 0: slug.Controller.type:type_name -> slug.EventType
|
|
4, // 1: slug.Controller.slug_event:type_name -> slug.SlugChangeEvent
|
|
0, // 2: slug.Client.type:type_name -> slug.EventType
|
|
3, // 3: slug.Client.auth_event:type_name -> slug.Authentication
|
|
5, // 4: slug.Client.slug_event_response:type_name -> slug.SlugChangeEventResponse
|
|
2, // 5: slug.EventService.Subscribe:input_type -> slug.Client
|
|
1, // 6: slug.EventService.Subscribe:output_type -> slug.Controller
|
|
6, // [6:7] is the sub-list for method output_type
|
|
5, // [5:6] is the sub-list for method input_type
|
|
5, // [5:5] is the sub-list for extension type_name
|
|
5, // [5:5] is the sub-list for extension extendee
|
|
0, // [0:5] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_events_proto_init() }
|
|
func file_events_proto_init() {
|
|
if File_events_proto != nil {
|
|
return
|
|
}
|
|
file_events_proto_msgTypes[0].OneofWrappers = []any{
|
|
(*Controller_SlugEvent)(nil),
|
|
}
|
|
file_events_proto_msgTypes[1].OneofWrappers = []any{
|
|
(*Client_AuthEvent)(nil),
|
|
(*Client_SlugEventResponse)(nil),
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_events_proto_rawDesc), len(file_events_proto_rawDesc)),
|
|
NumEnums: 1,
|
|
NumMessages: 5,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_events_proto_goTypes,
|
|
DependencyIndexes: file_events_proto_depIdxs,
|
|
EnumInfos: file_events_proto_enumTypes,
|
|
MessageInfos: file_events_proto_msgTypes,
|
|
}.Build()
|
|
File_events_proto = out.File
|
|
file_events_proto_goTypes = nil
|
|
file_events_proto_depIdxs = nil
|
|
}
|