entities

package
v0.0.0-...-9296acd Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Title string `json:"title"`
	URL   string `json:"url"`
}

type Images

type Images []*Image

type ImagesSearchInput

type ImagesSearchInput struct {
	Query string `form:"q"`
}

func (*ImagesSearchInput) Valid

func (ipt *ImagesSearchInput) Valid() bool

type LGTM

type LGTM struct {
	ID        string     `json:"id" dynamo:"id"         dynamodbav:"id"`
	Status    LGTMStatus `json:"-"  dynamo:"status"     dynamodbav:"status"`
	CreatedAt time.Time  `json:"-"  dynamo:"created_at" dynamodbav:"created_at"`
}

type LGTMCreateFrom

type LGTMCreateFrom string
const (
	LGTMCreateFromURL    LGTMCreateFrom = "URL"
	LGTMCreateFromBase64 LGTMCreateFrom = "BASE64"
)

type LGTMCreateInput

type LGTMCreateInput struct {
	URL         string `json:"url"`
	Base64      string `json:"base64"`
	ContentType string `json:"content_type"`
	From        LGTMCreateFrom
}

func (*LGTMCreateInput) Valid

func (ipt *LGTMCreateInput) Valid() bool

type LGTMFindAllInput

type LGTMFindAllInput struct {
	After  *string `form:"after"`
	Random bool    `form:"random"`
}

type LGTMImage

type LGTMImage struct {
	Data        []byte
	ContentType string
}

type LGTMStatus

type LGTMStatus string
const (
	LGTMStatusOK       LGTMStatus = "ok"
	LGTMStatusPending  LGTMStatus = "pending"
	LGTMStatusDeleting LGTMStatus = "deleting"
)

type LGTMs

type LGTMs []*LGTM

type Report

type Report struct {
	ID        string     `json:"id" dynamo:"id"`
	LGTMID    string     `json:"-"  dynamo:"lgtm_id"`
	Type      ReportType `json:"-"  dynamo:"type"`
	Text      string     `json:"-"  dynamo:"text"`
	CreatedAt time.Time  `json:"-"  dynamo:"created_at"`
}

type ReportCreateInput

type ReportCreateInput struct {
	LGTMID string     `json:"lgtm_id"`
	Type   ReportType `json:"type"`
	Text   string     `json:"text"`
}

func (*ReportCreateInput) Valid

func (ipt *ReportCreateInput) Valid() bool

type ReportType

type ReportType string
const (
	ReportTypeIllegal       ReportType = "illegal"
	ReportTypeInappropriate ReportType = "inappropriate"
	ReportTypeOther         ReportType = "other"
)

func (ReportType) Valid

func (t ReportType) Valid() bool

Jump to

Keyboard shortcuts

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