example

package
v0.0.0-...-9bd6acb Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllExamplesOut

type AllExamplesOut []ExampleOut

func (AllExamplesOut) FromStore

func (e AllExamplesOut) FromStore(in []store.Example) AllExamplesOut

type ExampleIn

type ExampleIn struct {
	weaver.AutoMarshal
	Message string
}

func (ExampleIn) ToStore

func (e ExampleIn) ToStore() (params store.CreateExampleParams)

func (*ExampleIn) WeaverMarshal

func (x *ExampleIn) WeaverMarshal(enc *codegen.Encoder)

func (*ExampleIn) WeaverUnmarshal

func (x *ExampleIn) WeaverUnmarshal(dec *codegen.Decoder)

type ExampleOut

type ExampleOut struct {
	weaver.AutoMarshal
	ID        int       `json:"id,omitempty"`
	Message   string    `json:"message,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
}

func (ExampleOut) FromStore

func (e ExampleOut) FromStore(in store.Example) ExampleOut

func (*ExampleOut) WeaverMarshal

func (x *ExampleOut) WeaverMarshal(enc *codegen.Encoder)

func (*ExampleOut) WeaverUnmarshal

func (x *ExampleOut) WeaverUnmarshal(dec *codegen.Decoder)

type Service

type Service interface {
	AllExamples(ctx context.Context) (out AllExamplesOut, err error)
	GetOneExampleById(ctx context.Context, id int64) (out ExampleOut, err error)
	CreateExample(ctx context.Context, in ExampleIn) (ok bool, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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