expected

package
v0.1.40 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Overview

This code has been generated by struct.tmpl, please don't edit, but keep the linters happy

This code has been generated by crud.tmpl, please don't edit, but keep the linters happy

This code has been generated by http.tmpl, please don't edit, but keep the linters happy

This code has been generated by httpd.tmpl, please don't edit, but keep the linters happy

This code has been generated by struct.tmpl, please don't edit, but keep the linters happy

Index

Constants

View Source
const (
	FooBopBase     = "/foo_bop"
	FooBopDir      = FooBopBase + "/"
	FooBopByBarDir = FooBopDir + "bar/"
)

Variables

View Source
var ModelFS embed.FS

Functions

func FooBopCreate

func FooBopCreate(ctx context.Context, querier pgxtype.Querier, fooBop *FooBopCreatable) (int64, error)

func FooBopCreateTable

func FooBopCreateTable(ctx context.Context, querier pgxtype.Querier) error

func FooBopDelete

func FooBopDelete(ctx context.Context, querier pgxtype.Querier, fooBopID int64) error

func FooBopPatch

func FooBopPatch(ctx context.Context, querier pgxtype.Querier, fooBopID int64, fooBop *FooBopPatchable) error

func FooBopUpdate

func FooBopUpdate(ctx context.Context, querier pgxtype.Querier, fooBopID int64, fooBop *FooBopUpdatable) error

Types

type Audit

type Audit struct {
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	AuditCreatable
	ID int64 `json:"id"`
}

type AuditCreatable

type AuditCreatable struct {
	AuditUpdatable
}

type AuditPatchable

type AuditPatchable struct {
	Name *string `json:"name"`
}

type AuditUpdatable

type AuditUpdatable struct {
	Name string `json:"name"`
}

type FooBop

type FooBop struct {
	FooBopCreatable
	ID int64 `json:"id"`
}

func FooBopRead

func FooBopRead(ctx context.Context, querier pgxtype.Querier, fooBopID int64) (*FooBop, error)

func FooBopReadByBar

func FooBopReadByBar(ctx context.Context, querier pgxtype.Querier, fooBopBar int32) (*FooBop, error)

type FooBopClient

type FooBopClient struct {
	// contains filtered or unexported fields
}

func NewFooBopClient

func NewFooBopClient(baseURL string, httpClient *http.Client) *FooBopClient

func (*FooBopClient) Create

func (fbc *FooBopClient) Create(ctx context.Context, buf *bytes.Buffer, fooBop *FooBopCreatable) (int64, error)

func (*FooBopClient) Delete

func (fbc *FooBopClient) Delete(ctx context.Context, buf *bytes.Buffer, fooBopID int64) error

func (*FooBopClient) Patch

func (fbc *FooBopClient) Patch(ctx context.Context, buf *bytes.Buffer, fooBopID int64, fooBop *FooBopPatchable) error

func (*FooBopClient) Read

func (fbc *FooBopClient) Read(ctx context.Context, fooBopID int64) (*FooBop, error)

func (*FooBopClient) ReadByBar

func (fbc *FooBopClient) ReadByBar(ctx context.Context, fooBopBar int32) (*FooBop, error)

func (*FooBopClient) Update

func (fbc *FooBopClient) Update(ctx context.Context, buf *bytes.Buffer, fooBopID int64, fooBop *FooBopUpdatable) error

type FooBopCreatable

type FooBopCreatable struct {
	FooBopUpdatable
	Blah bool `json:"blah"`
}

type FooBopCreateResponse

type FooBopCreateResponse struct {
	ID int64 `json:"id"`
}

type FooBopDeleteResponse

type FooBopDeleteResponse struct{}

type FooBopPatchResponse

type FooBopPatchResponse struct{}

type FooBopPatchable

type FooBopPatchable struct {
	Bar    *int32    `json:"bar"`
	Baz    *[]byte   `json:"baz"`
	BipBup *[]string `json:"bip_bup"`
}

type FooBopUpdatable

type FooBopUpdatable struct {
	Baz    []byte   `json:"baz"`
	BipBup []string `json:"bip_bup"`
	Bar    int32    `json:"bar"`
}

type FooBopUpdateResponse

type FooBopUpdateResponse struct{}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(logger dlog.Logger, conn *pgxpool.Pool, clstr cluster.Cluster) (*Server, error)

func (*Server) Close

func (s *Server) Close(ctx context.Context) error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(resp http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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