helloworld

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register()

Types

type Helloworld

type Helloworld struct {
	model.Empty
}

Helloworld is the model definition.

type Helloworld2

type Helloworld2 struct {
	Before string `json:"before" schema:"before"`
	After  string `json:"after" schema:"after"`

	model.Base
}

type Module

type Module struct{}

Module implements the `types.Module` interface.

func (Module) Param

func (Module) Param() string

func (Module) Pub

func (Module) Pub() bool

func (Module) Route

func (Module) Route() string

func (Module) Service

func (Module) Service() types.Service[*Helloworld, *Req, *Rsp]

type Module2

type Module2 struct{}

func (*Module2) Param

func (*Module2) Param() string

Param returns the route parameter identifier. returns empty string to use default "id".

func (*Module2) Pub

func (*Module2) Pub() bool

func (*Module2) Route

func (*Module2) Route() string

func (*Module2) Service

type Req

type Req struct {
	Field1 string
	Field2 int
}

Req is the custom request type.

type Rsp

type Rsp struct {
	Field3 string
	Field4 int
}

Rsp is the custom response type.

type Service

type Service struct {
	service.Base[*Helloworld, *Req, *Rsp]
}

Service implements the `types.Service` interface.

func (*Service) Create

func (s *Service) Create(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) CreateMany

func (s *Service) CreateMany(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) Delete

func (s *Service) Delete(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) DeleteMany

func (s *Service) DeleteMany(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) Get

func (s *Service) Get(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) List

func (s *Service) List(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) Patch

func (s *Service) Patch(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) PatchMany

func (s *Service) PatchMany(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) Update

func (s *Service) Update(ctx *types.ServiceContext, req *Req) (*Rsp, error)

func (*Service) UpdateMany

func (s *Service) UpdateMany(ctx *types.ServiceContext, req *Req) (*Rsp, error)

type Service2

type Service2 struct {
	service.Base[*Helloworld2, *Helloworld2, *Helloworld2]
}

func (*Service2) CreateAfter

func (s *Service2) CreateAfter(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) CreateBefore

func (s *Service2) CreateBefore(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) CreateManyAfter

func (s *Service2) CreateManyAfter(ctx *types.ServiceContext, hws ...*Helloworld2) error

func (*Service2) CreateManyBefore

func (s *Service2) CreateManyBefore(ctx *types.ServiceContext, hws ...*Helloworld2) error

func (*Service2) DeleteAfter

func (s *Service2) DeleteAfter(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) DeleteBefore

func (s *Service2) DeleteBefore(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) DeleteManyAfter

func (s *Service2) DeleteManyAfter(ctx *types.ServiceContext, hws ...*Helloworld2) error

func (*Service2) DeleteManyBefore

func (s *Service2) DeleteManyBefore(ctx *types.ServiceContext, hws ...*Helloworld2) error

func (*Service2) GetAfter

func (s *Service2) GetAfter(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) GetBefore

func (s *Service2) GetBefore(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) ListAfter

func (s *Service2) ListAfter(ctx *types.ServiceContext, hws *[]*Helloworld2) error

func (*Service2) ListBefore

func (s *Service2) ListBefore(ctx *types.ServiceContext, hws *[]*Helloworld2) error

func (*Service2) PatchAfter

func (s *Service2) PatchAfter(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) PatchBefore

func (s *Service2) PatchBefore(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) PatchManyAfter

func (s *Service2) PatchManyAfter(ctx *types.ServiceContext, hws ...*Helloworld2) error

func (*Service2) PatchManyBefore

func (s *Service2) PatchManyBefore(ctx *types.ServiceContext, hws ...*Helloworld2) error

func (*Service2) UpdateAfter

func (s *Service2) UpdateAfter(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) UpdateBefore

func (s *Service2) UpdateBefore(ctx *types.ServiceContext, hw *Helloworld2) error

func (*Service2) UpdateManyAfter

func (s *Service2) UpdateManyAfter(ctx *types.ServiceContext, hws ...*Helloworld2) error

func (*Service2) UpdateManyBefore

func (s *Service2) UpdateManyBefore(ctx *types.ServiceContext, hws ...*Helloworld2) error

Jump to

Keyboard shortcuts

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