Documentation

Overview

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

Index

Constants

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"
)

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".

Source Files