v080

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var URIRegEx = regexp.MustCompile(
	`^(?:http(s)?://)[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$`)

Functions

func RemoveInvalidEmojiRegisteredReactions added in v0.8.1

func RemoveInvalidEmojiRegisteredReactions(reactions []v040posts.Reaction) []v040posts.Reaction

RemoveInvalidEmojiRegisteredReactions removes all the invalid registered reactions. This removes all the ones that have either a shortcode which is associated to an emoji, or a value that is not a URL.

Types

type GenesisState

type GenesisState struct {
	Posts               []v040posts.Post                  `json:"posts"`
	UsersPollAnswers    map[string][]v040posts.UserAnswer `json:"users_poll_answers"`
	PostReactions       map[string][]v060.PostReaction    `json:"post_reactions"`
	RegisteredReactions []v040posts.Reaction              `json:"registered_reactions"`
	Params              Params                            `json:"params"`
}

GenesisState contains the data of a v0.6.0 genesis state for the posts module

func Migrate

func Migrate(oldGenState v060posts.GenesisState) GenesisState

Migrate accepts exported genesis state from v0.6.0 and migrates it to v0.8.0 genesis state. This migration replace all the old post reactions structure with the new one that includes shortcodes.

type Params

type Params struct {
	MaxPostMessageLength            sdk.Int `json:"max_post_message_length" yaml:"max_post_message_length"`
	MaxOptionalDataFieldsNumber     sdk.Int `json:"max_optional_data_fields_number" yaml:"max_optional_data_fields_number"`
	MaxOptionalDataFieldValueLength sdk.Int `json:"max_optional_data_field_value_length" yaml:"max_optional_data_field_value_length"`
}

Jump to

Keyboard shortcuts

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