iso

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteSlice added in v0.1.1

type ByteSlice []byte

ByteSlice is a wrapper for the native Go byte slice that will serialize to Base64.

func (ByteSlice) MarshalText added in v0.1.1

func (bs ByteSlice) MarshalText() ([]byte, error)

MarshalText marshals the byte slice to a Base64 string.

func (ByteSlice) String added in v0.2.0

func (bs ByteSlice) String() string

String returns the byte slice as a Base64 string.

func (*ByteSlice) UnmarshalText added in v0.1.1

func (bs *ByteSlice) UnmarshalText(b []byte) error

UnmarshalText unmarshals the byte slice from a Base64 string.

type Date

type Date time.Time

Date is a date in ISO 8601 format, per RFC 3339.

func (Date) MarshalText

func (d Date) MarshalText() ([]byte, error)

MarshalText marshals the date to an ISO 8601 string.

func (Date) String

func (d Date) String() string

String returns the date as an ISO 8601 string.

func (*Date) UnmarshalText

func (d *Date) UnmarshalText(b []byte) error

UnmarshalText unmarshals the date from an ISO 8601 string.

type DateTime

type DateTime time.Time

DateTime is a date and time in ISO 8601 format, per RFC 3339.

func (DateTime) MarshalText

func (dt DateTime) MarshalText() ([]byte, error)

MarshalText marshals the date-time to an ISO 8601 string.

func (DateTime) String

func (dt DateTime) String() string

String returns the date-time as an ISO 8601 string.

func (*DateTime) UnmarshalText

func (dt *DateTime) UnmarshalText(b []byte) error

UnmarshalText unmarshals the date-time from an ISO 8601 string.

type Duration

type Duration time.Duration

Duration is a duration in ISO 8601 format.

func (Duration) MarshalText

func (d Duration) MarshalText() ([]byte, error)

MarshalText marshals the duration to an ISO 8601 string.

func (Duration) String

func (d Duration) String() string

String returns the duration as an ISO 8601 string.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(b []byte) error

UnmarshalText unmarshals the duration from an ISO 8601 string.

type Time

type Time time.Time

Time is a time in ISO 8601 format, per RFC 3339.

func (Time) MarshalText

func (t Time) MarshalText() ([]byte, error)

MarshalText marshals the time to an ISO 8601 string.

func (Time) String

func (t Time) String() string

String returns the time as an ISO 8601 string.

func (*Time) UnmarshalText

func (t *Time) UnmarshalText(b []byte) error

UnmarshalText unmarshals the time from an ISO 8601 string.

Jump to

Keyboard shortcuts

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