str

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package str implements a kiwi.Value which can store a simple string.

Index

Constants

View Source
const (
	// Get gets the string value.
	//
	// Returns a string.
	Get kiwi.Action = "GET"

	// Update updates the value of the string.
	//
	// Returns the updated string.
	Update kiwi.Action = "UPDATE"
)
View Source
const Type kiwi.ValueType = "str"

Type of str value.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value string

Value can store a string.

It implements the kiwi.Value interface.

func (*Value) DoMap

func (v *Value) DoMap() map[kiwi.Action]kiwi.DoFunc

DoMap returns the map of v's actions with it's do functions.

func (*Value) FromJSON

func (v *Value) FromJSON(rawmessage json.RawMessage) error

FromJSON populates the s with the data from RawMessage

func (*Value) ToJSON

func (v *Value) ToJSON() (json.RawMessage, error)

ToJSON returns the raw byte array of v's data

func (*Value) Type

func (v *Value) Type() kiwi.ValueType

Type returns v's type, i.e., "str".

Jump to

Keyboard shortcuts

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