utils

package
v0.0.0-...-03ee383 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthCli        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCli          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCli = fmt.Errorf("proto: unexpected end of group")
)

Functions

func ParseAttachmentContent

func ParseAttachmentContent(cdc codec.Codec, dataFile string) (types.AttachmentContent, error)

ParseAttachmentContent reads and parses a AttachmentContent from file.

Types

type CreatePostJSON

type CreatePostJSON struct {
	// (optional) External id for this post
	ExternalID string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
	// (optional) Text of the post
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// (optional) Entities connected to this post
	Entities *types.Entities `protobuf:"bytes,3,opt,name=entities,proto3" json:"entities,omitempty"`
	// Tags related to this post
	Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
	// Attachments of the post
	Attachments []*types1.Any `protobuf:"bytes,5,rep,name=attachments,proto3" json:"attachments,omitempty"`
	// (optional) Id of the original post of the conversation
	ConversationID uint64 `protobuf:"varint,6,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"`
	// Reply settings of this post
	ReplySettings types.ReplySetting `` /* 135-byte string literal not displayed */
	// A list this posts references (either as a reply, repost or quote)
	ReferencedPosts []types.PostReference `protobuf:"bytes,8,rep,name=referenced_posts,json=referencedPosts,proto3" json:"referenced_posts"`
}

CreatePostJSON contains the data that can be specified when creating a Post using the CLi command

func ParseCreatePostJSON

func ParseCreatePostJSON(cdc codec.Codec, dataFile string) (CreatePostJSON, error)

ParseCreatePostJSON reads and parses a CreatePostJSON from file.

func (*CreatePostJSON) Descriptor

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

func (*CreatePostJSON) GetAttachments

func (m *CreatePostJSON) GetAttachments() []*types1.Any

func (*CreatePostJSON) GetConversationID

func (m *CreatePostJSON) GetConversationID() uint64

func (*CreatePostJSON) GetEntities

func (m *CreatePostJSON) GetEntities() *types.Entities

func (*CreatePostJSON) GetExternalID

func (m *CreatePostJSON) GetExternalID() string

func (*CreatePostJSON) GetReferencedPosts

func (m *CreatePostJSON) GetReferencedPosts() []types.PostReference

func (*CreatePostJSON) GetReplySettings

func (m *CreatePostJSON) GetReplySettings() types.ReplySetting

func (*CreatePostJSON) GetTags

func (m *CreatePostJSON) GetTags() []string

func (*CreatePostJSON) GetText

func (m *CreatePostJSON) GetText() string

func (*CreatePostJSON) Marshal

func (m *CreatePostJSON) Marshal() (dAtA []byte, err error)

func (*CreatePostJSON) MarshalTo

func (m *CreatePostJSON) MarshalTo(dAtA []byte) (int, error)

func (*CreatePostJSON) MarshalToSizedBuffer

func (m *CreatePostJSON) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CreatePostJSON) ProtoMessage

func (*CreatePostJSON) ProtoMessage()

func (*CreatePostJSON) Reset

func (m *CreatePostJSON) Reset()

func (*CreatePostJSON) Size

func (m *CreatePostJSON) Size() (n int)

func (*CreatePostJSON) String

func (m *CreatePostJSON) String() string

func (*CreatePostJSON) Unmarshal

func (m *CreatePostJSON) Unmarshal(dAtA []byte) error

func (*CreatePostJSON) XXX_DiscardUnknown

func (m *CreatePostJSON) XXX_DiscardUnknown()

func (*CreatePostJSON) XXX_Marshal

func (m *CreatePostJSON) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreatePostJSON) XXX_Merge

func (m *CreatePostJSON) XXX_Merge(src proto.Message)

func (*CreatePostJSON) XXX_Size

func (m *CreatePostJSON) XXX_Size() int

func (*CreatePostJSON) XXX_Unmarshal

func (m *CreatePostJSON) XXX_Unmarshal(b []byte) error

type EditPostJSON

type EditPostJSON struct {
	// New text of the post
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// New entities connected to this post
	Entities *types.Entities `protobuf:"bytes,2,opt,name=entities,proto3" json:"entities,omitempty"`
	// New tags associated to this post
	Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
}

EditPostJSON contains the data that can be specified when editing a Post using the CLI command

func ParseEditPostJSON

func ParseEditPostJSON(cdc codec.Codec, dataFile string) (EditPostJSON, error)

ParseEditPostJSON reads and parses a EditPostJSON from file.

func (*EditPostJSON) Descriptor

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

func (*EditPostJSON) GetEntities

func (m *EditPostJSON) GetEntities() *types.Entities

func (*EditPostJSON) GetTags

func (m *EditPostJSON) GetTags() []string

func (*EditPostJSON) GetText

func (m *EditPostJSON) GetText() string

func (*EditPostJSON) Marshal

func (m *EditPostJSON) Marshal() (dAtA []byte, err error)

func (*EditPostJSON) MarshalTo

func (m *EditPostJSON) MarshalTo(dAtA []byte) (int, error)

func (*EditPostJSON) MarshalToSizedBuffer

func (m *EditPostJSON) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EditPostJSON) ProtoMessage

func (*EditPostJSON) ProtoMessage()

func (*EditPostJSON) Reset

func (m *EditPostJSON) Reset()

func (*EditPostJSON) Size

func (m *EditPostJSON) Size() (n int)

func (*EditPostJSON) String

func (m *EditPostJSON) String() string

func (*EditPostJSON) Unmarshal

func (m *EditPostJSON) Unmarshal(dAtA []byte) error

func (*EditPostJSON) XXX_DiscardUnknown

func (m *EditPostJSON) XXX_DiscardUnknown()

func (*EditPostJSON) XXX_Marshal

func (m *EditPostJSON) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EditPostJSON) XXX_Merge

func (m *EditPostJSON) XXX_Merge(src proto.Message)

func (*EditPostJSON) XXX_Size

func (m *EditPostJSON) XXX_Size() int

func (*EditPostJSON) XXX_Unmarshal

func (m *EditPostJSON) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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