types

package module
v0.0.0-...-0daf8d6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 7 Imported by: 1

README

types

Build Status | codecov | Go Report Card | GoDoc

Golang missing types with support for direct save on postgres.

If i miss something or you have something interesting, please be part of this project. Let me know! My contact is at the end.

With support for

  • Date (YYYY-MM-DD ; ...)
  • Time (HH:MM:SS; ...)
  • Day (monday ; tuesday ; wednesday ; thursday ; friday ; saturday ; sunday)
  • ListDay ([]*Day)

Dependecy Management

Dep

Project dependencies are managed using Dep. Read more about Dep.

  • Install dependencies: dep ensure
  • Update dependencies: dep ensure -update
Go
go get github.com/joaosoft/types

Known issues

Follow me at

Facebook: https://www.facebook.com/joaosoft

LinkedIn: https://www.linkedin.com/in/jo%C3%A3o-ribeiro-b2775438/

If you have something to add, please let me know joaosoft@gmail.com

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date string

func (*Date) Scan

func (d *Date) Scan(src interface{}) error

func (Date) Value

func (d Date) Value() (driver.Value, error)

type Day

type Day string
const (
	DayMonday    Day = "monday"
	DayTuesday   Day = "tuesday"
	DayWednesday Day = "wednesday"
	DayThursday  Day = "thursday"
	DayFriday    Day = "friday"
	DaySaturday  Day = "saturday"
	DaySunday    Day = "sunday"
)

func (*Day) Scan

func (d *Day) Scan(src interface{}) error

func (Day) Value

func (d Day) Value() (driver.Value, error)

type ListDay

type ListDay []Day

func (*ListDay) Contains

func (l *ListDay) Contains(day Day) bool

func (*ListDay) Scan

func (a *ListDay) Scan(src interface{}) error

func (ListDay) Value

func (a ListDay) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type Time

type Time string

func (*Time) Scan

func (t *Time) Scan(src interface{}) error

func (Time) Value

func (t Time) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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