mirror of
https://github.com/mautrix/signal.git
synced 2026-09-17 00:02:04 -04:00
357 lines
14 KiB
Go
357 lines
14 KiB
Go
|
|
//
|
||
|
|
// Copyright 2026 Signal Messenger, LLC
|
||
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||
|
|
|
||
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
|
|
// versions:
|
||
|
|
// protoc-gen-go v1.36.11
|
||
|
|
// protoc v7.34.1
|
||
|
|
// source: org/signal/chat/attachments.proto
|
||
|
|
|
||
|
|
package attachments
|
||
|
|
|
||
|
|
import (
|
||
|
|
common "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/common"
|
||
|
|
errors "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/errors"
|
||
|
|
_ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/require"
|
||
|
|
_ "go.mau.fi/mautrix-signal/pkg/signalmeow/protobuf/rpc/tag"
|
||
|
|
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 GetUploadFormRequest struct {
|
||
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
|
// The length of the attachment for the requested upload form. Uploads
|
||
|
|
// performed with this form will be limited to the provided length.
|
||
|
|
UploadLength uint64 `protobuf:"varint,1,opt,name=uploadLength,proto3" json:"uploadLength,omitempty"`
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetUploadFormRequest) Reset() {
|
||
|
|
*x = GetUploadFormRequest{}
|
||
|
|
mi := &file_org_signal_chat_attachments_proto_msgTypes[0]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetUploadFormRequest) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*GetUploadFormRequest) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *GetUploadFormRequest) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_org_signal_chat_attachments_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 GetUploadFormRequest.ProtoReflect.Descriptor instead.
|
||
|
|
func (*GetUploadFormRequest) Descriptor() ([]byte, []int) {
|
||
|
|
return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{0}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetUploadFormRequest) GetUploadLength() uint64 {
|
||
|
|
if x != nil {
|
||
|
|
return x.UploadLength
|
||
|
|
}
|
||
|
|
return 0
|
||
|
|
}
|
||
|
|
|
||
|
|
type GetUploadFormResponse struct {
|
||
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
|
// Types that are valid to be assigned to Outcome:
|
||
|
|
//
|
||
|
|
// *GetUploadFormResponse_UploadForm
|
||
|
|
// *GetUploadFormResponse_ExceedsMaxUploadLength
|
||
|
|
Outcome isGetUploadFormResponse_Outcome `protobuf_oneof:"outcome"`
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetUploadFormResponse) Reset() {
|
||
|
|
*x = GetUploadFormResponse{}
|
||
|
|
mi := &file_org_signal_chat_attachments_proto_msgTypes[1]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetUploadFormResponse) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*GetUploadFormResponse) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *GetUploadFormResponse) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_org_signal_chat_attachments_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 GetUploadFormResponse.ProtoReflect.Descriptor instead.
|
||
|
|
func (*GetUploadFormResponse) Descriptor() ([]byte, []int) {
|
||
|
|
return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{1}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetUploadFormResponse) GetOutcome() isGetUploadFormResponse_Outcome {
|
||
|
|
if x != nil {
|
||
|
|
return x.Outcome
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetUploadFormResponse) GetUploadForm() *common.UploadForm {
|
||
|
|
if x != nil {
|
||
|
|
if x, ok := x.Outcome.(*GetUploadFormResponse_UploadForm); ok {
|
||
|
|
return x.UploadForm
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetUploadFormResponse) GetExceedsMaxUploadLength() *errors.FailedPrecondition {
|
||
|
|
if x != nil {
|
||
|
|
if x, ok := x.Outcome.(*GetUploadFormResponse_ExceedsMaxUploadLength); ok {
|
||
|
|
return x.ExceedsMaxUploadLength
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
type isGetUploadFormResponse_Outcome interface {
|
||
|
|
isGetUploadFormResponse_Outcome()
|
||
|
|
}
|
||
|
|
|
||
|
|
type GetUploadFormResponse_UploadForm struct {
|
||
|
|
UploadForm *common.UploadForm `protobuf:"bytes,1,opt,name=upload_form,json=uploadForm,proto3,oneof"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type GetUploadFormResponse_ExceedsMaxUploadLength struct {
|
||
|
|
// The request size was larger than the maximum supported upload size. The
|
||
|
|
// maximum upload size is subject to change and is governed by
|
||
|
|
// `global.attachments.maxBytes`
|
||
|
|
ExceedsMaxUploadLength *errors.FailedPrecondition `protobuf:"bytes,2,opt,name=exceeds_max_upload_length,json=exceedsMaxUploadLength,proto3,oneof"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*GetUploadFormResponse_UploadForm) isGetUploadFormResponse_Outcome() {}
|
||
|
|
|
||
|
|
func (*GetUploadFormResponse_ExceedsMaxUploadLength) isGetUploadFormResponse_Outcome() {}
|
||
|
|
|
||
|
|
type GetStickerUploadFormRequest struct {
|
||
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
|
// The number of stickers in the sticker pack to upload
|
||
|
|
StickerCount uint32 `protobuf:"varint,1,opt,name=sticker_count,json=stickerCount,proto3" json:"sticker_count,omitempty"`
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormRequest) Reset() {
|
||
|
|
*x = GetStickerUploadFormRequest{}
|
||
|
|
mi := &file_org_signal_chat_attachments_proto_msgTypes[2]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormRequest) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*GetStickerUploadFormRequest) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormRequest) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_org_signal_chat_attachments_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 GetStickerUploadFormRequest.ProtoReflect.Descriptor instead.
|
||
|
|
func (*GetStickerUploadFormRequest) Descriptor() ([]byte, []int) {
|
||
|
|
return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{2}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormRequest) GetStickerCount() uint32 {
|
||
|
|
if x != nil {
|
||
|
|
return x.StickerCount
|
||
|
|
}
|
||
|
|
return 0
|
||
|
|
}
|
||
|
|
|
||
|
|
type GetStickerUploadFormResponse struct {
|
||
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||
|
|
// A randomly-generated ID for the new sticker pack
|
||
|
|
PackId string `protobuf:"bytes,1,opt,name=pack_id,json=packId,proto3" json:"pack_id,omitempty"`
|
||
|
|
// An upload form clients must use to upload a manifest for the sticker pack
|
||
|
|
ManifestUploadForm *common.S3UploadForm `protobuf:"bytes,2,opt,name=manifest_upload_form,json=manifestUploadForm,proto3" json:"manifest_upload_form,omitempty"`
|
||
|
|
// Upload forms for individual stickers within the sticker pack
|
||
|
|
StickerUploadForms []*common.S3UploadForm `protobuf:"bytes,3,rep,name=sticker_upload_forms,json=stickerUploadForms,proto3" json:"sticker_upload_forms,omitempty"`
|
||
|
|
unknownFields protoimpl.UnknownFields
|
||
|
|
sizeCache protoimpl.SizeCache
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormResponse) Reset() {
|
||
|
|
*x = GetStickerUploadFormResponse{}
|
||
|
|
mi := &file_org_signal_chat_attachments_proto_msgTypes[3]
|
||
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
|
|
ms.StoreMessageInfo(mi)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormResponse) String() string {
|
||
|
|
return protoimpl.X.MessageStringOf(x)
|
||
|
|
}
|
||
|
|
|
||
|
|
func (*GetStickerUploadFormResponse) ProtoMessage() {}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormResponse) ProtoReflect() protoreflect.Message {
|
||
|
|
mi := &file_org_signal_chat_attachments_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 GetStickerUploadFormResponse.ProtoReflect.Descriptor instead.
|
||
|
|
func (*GetStickerUploadFormResponse) Descriptor() ([]byte, []int) {
|
||
|
|
return file_org_signal_chat_attachments_proto_rawDescGZIP(), []int{3}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormResponse) GetPackId() string {
|
||
|
|
if x != nil {
|
||
|
|
return x.PackId
|
||
|
|
}
|
||
|
|
return ""
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormResponse) GetManifestUploadForm() *common.S3UploadForm {
|
||
|
|
if x != nil {
|
||
|
|
return x.ManifestUploadForm
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (x *GetStickerUploadFormResponse) GetStickerUploadForms() []*common.S3UploadForm {
|
||
|
|
if x != nil {
|
||
|
|
return x.StickerUploadForms
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
var File_org_signal_chat_attachments_proto protoreflect.FileDescriptor
|
||
|
|
|
||
|
|
const file_org_signal_chat_attachments_proto_rawDesc = "" +
|
||
|
|
"\n" +
|
||
|
|
"!org/signal/chat/attachments.proto\x12\x1borg.signal.chat.attachments\x1a\x1corg/signal/chat/common.proto\x1a\x1dorg/signal/chat/require.proto\x1a\x1corg/signal/chat/errors.proto\x1a\x19org/signal/chat/tag.proto\"B\n" +
|
||
|
|
"\x14GetUploadFormRequest\x12*\n" +
|
||
|
|
"\fuploadLength\x18\x01 \x01(\x04B\x06\xb2\x97\"\x02\b\x01R\fuploadLength\"\xe7\x01\n" +
|
||
|
|
"\x15GetUploadFormResponse\x12E\n" +
|
||
|
|
"\vupload_form\x18\x01 \x01(\v2\".org.signal.chat.common.UploadFormH\x00R\n" +
|
||
|
|
"uploadForm\x12|\n" +
|
||
|
|
"\x19exceeds_max_upload_length\x18\x02 \x01(\v2*.org.signal.chat.errors.FailedPreconditionB\x13\xc2\xd5\"\x0foversize_uploadH\x00R\x16exceedsMaxUploadLengthB\t\n" +
|
||
|
|
"\aoutcome\"M\n" +
|
||
|
|
"\x1bGetStickerUploadFormRequest\x12.\n" +
|
||
|
|
"\rsticker_count\x18\x01 \x01(\rB\t\xb2\x97\"\x05\b\x01\x10\xc9\x01R\fstickerCount\"\xe7\x01\n" +
|
||
|
|
"\x1cGetStickerUploadFormResponse\x12\x17\n" +
|
||
|
|
"\apack_id\x18\x01 \x01(\tR\x06packId\x12V\n" +
|
||
|
|
"\x14manifest_upload_form\x18\x02 \x01(\v2$.org.signal.chat.common.S3UploadFormR\x12manifestUploadForm\x12V\n" +
|
||
|
|
"\x14sticker_upload_forms\x18\x03 \x03(\v2$.org.signal.chat.common.S3UploadFormR\x12stickerUploadForms2\x9d\x02\n" +
|
||
|
|
"\vAttachments\x12x\n" +
|
||
|
|
"\rGetUploadForm\x121.org.signal.chat.attachments.GetUploadFormRequest\x1a2.org.signal.chat.attachments.GetUploadFormResponse\"\x00\x12\x8d\x01\n" +
|
||
|
|
"\x14GetStickerUploadForm\x128.org.signal.chat.attachments.GetStickerUploadFormRequest\x1a9.org.signal.chat.attachments.GetStickerUploadFormResponse\"\x00\x1a\x04\xc8\xd5\"\x01B\x02P\x01b\x06proto3"
|
||
|
|
|
||
|
|
var (
|
||
|
|
file_org_signal_chat_attachments_proto_rawDescOnce sync.Once
|
||
|
|
file_org_signal_chat_attachments_proto_rawDescData []byte
|
||
|
|
)
|
||
|
|
|
||
|
|
func file_org_signal_chat_attachments_proto_rawDescGZIP() []byte {
|
||
|
|
file_org_signal_chat_attachments_proto_rawDescOnce.Do(func() {
|
||
|
|
file_org_signal_chat_attachments_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_org_signal_chat_attachments_proto_rawDesc), len(file_org_signal_chat_attachments_proto_rawDesc)))
|
||
|
|
})
|
||
|
|
return file_org_signal_chat_attachments_proto_rawDescData
|
||
|
|
}
|
||
|
|
|
||
|
|
var file_org_signal_chat_attachments_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||
|
|
var file_org_signal_chat_attachments_proto_goTypes = []any{
|
||
|
|
(*GetUploadFormRequest)(nil), // 0: org.signal.chat.attachments.GetUploadFormRequest
|
||
|
|
(*GetUploadFormResponse)(nil), // 1: org.signal.chat.attachments.GetUploadFormResponse
|
||
|
|
(*GetStickerUploadFormRequest)(nil), // 2: org.signal.chat.attachments.GetStickerUploadFormRequest
|
||
|
|
(*GetStickerUploadFormResponse)(nil), // 3: org.signal.chat.attachments.GetStickerUploadFormResponse
|
||
|
|
(*common.UploadForm)(nil), // 4: org.signal.chat.common.UploadForm
|
||
|
|
(*errors.FailedPrecondition)(nil), // 5: org.signal.chat.errors.FailedPrecondition
|
||
|
|
(*common.S3UploadForm)(nil), // 6: org.signal.chat.common.S3UploadForm
|
||
|
|
}
|
||
|
|
var file_org_signal_chat_attachments_proto_depIdxs = []int32{
|
||
|
|
4, // 0: org.signal.chat.attachments.GetUploadFormResponse.upload_form:type_name -> org.signal.chat.common.UploadForm
|
||
|
|
5, // 1: org.signal.chat.attachments.GetUploadFormResponse.exceeds_max_upload_length:type_name -> org.signal.chat.errors.FailedPrecondition
|
||
|
|
6, // 2: org.signal.chat.attachments.GetStickerUploadFormResponse.manifest_upload_form:type_name -> org.signal.chat.common.S3UploadForm
|
||
|
|
6, // 3: org.signal.chat.attachments.GetStickerUploadFormResponse.sticker_upload_forms:type_name -> org.signal.chat.common.S3UploadForm
|
||
|
|
0, // 4: org.signal.chat.attachments.Attachments.GetUploadForm:input_type -> org.signal.chat.attachments.GetUploadFormRequest
|
||
|
|
2, // 5: org.signal.chat.attachments.Attachments.GetStickerUploadForm:input_type -> org.signal.chat.attachments.GetStickerUploadFormRequest
|
||
|
|
1, // 6: org.signal.chat.attachments.Attachments.GetUploadForm:output_type -> org.signal.chat.attachments.GetUploadFormResponse
|
||
|
|
3, // 7: org.signal.chat.attachments.Attachments.GetStickerUploadForm:output_type -> org.signal.chat.attachments.GetStickerUploadFormResponse
|
||
|
|
6, // [6:8] is the sub-list for method output_type
|
||
|
|
4, // [4:6] is the sub-list for method input_type
|
||
|
|
4, // [4:4] is the sub-list for extension type_name
|
||
|
|
4, // [4:4] is the sub-list for extension extendee
|
||
|
|
0, // [0:4] is the sub-list for field type_name
|
||
|
|
}
|
||
|
|
|
||
|
|
func init() { file_org_signal_chat_attachments_proto_init() }
|
||
|
|
func file_org_signal_chat_attachments_proto_init() {
|
||
|
|
if File_org_signal_chat_attachments_proto != nil {
|
||
|
|
return
|
||
|
|
}
|
||
|
|
file_org_signal_chat_attachments_proto_msgTypes[1].OneofWrappers = []any{
|
||
|
|
(*GetUploadFormResponse_UploadForm)(nil),
|
||
|
|
(*GetUploadFormResponse_ExceedsMaxUploadLength)(nil),
|
||
|
|
}
|
||
|
|
type x struct{}
|
||
|
|
out := protoimpl.TypeBuilder{
|
||
|
|
File: protoimpl.DescBuilder{
|
||
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_org_signal_chat_attachments_proto_rawDesc), len(file_org_signal_chat_attachments_proto_rawDesc)),
|
||
|
|
NumEnums: 0,
|
||
|
|
NumMessages: 4,
|
||
|
|
NumExtensions: 0,
|
||
|
|
NumServices: 1,
|
||
|
|
},
|
||
|
|
GoTypes: file_org_signal_chat_attachments_proto_goTypes,
|
||
|
|
DependencyIndexes: file_org_signal_chat_attachments_proto_depIdxs,
|
||
|
|
MessageInfos: file_org_signal_chat_attachments_proto_msgTypes,
|
||
|
|
}.Build()
|
||
|
|
File_org_signal_chat_attachments_proto = out.File
|
||
|
|
file_org_signal_chat_attachments_proto_goTypes = nil
|
||
|
|
file_org_signal_chat_attachments_proto_depIdxs = nil
|
||
|
|
}
|