codec

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

type Basic struct{}

Basic encodes and decodes any bytes data using a very simple encoding rule. A prefix (an exclamation mark "!") will be attached to the raw bytes data.

This allows the library to differentiate between empty raw bytes provided by the client from getting an empty data from Google Sheets API.

func NewBasic

func NewBasic() *Basic

func (*Basic) Decode

func (c *Basic) Decode(value string) ([]byte, error)

Decode converts the string data read from Google Sheet into raw bytes data after removing the exclamation mark "!" prefix.

func (*Basic) Encode

func (c *Basic) Encode(value []byte) (string, error)

Encode encodes the given raw bytes by using an exclamation mark "!" as a prefix.

Jump to

Keyboard shortcuts

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