genservice

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 6 Imported by: 0

README

Gogen Service

Call gogen service PublishOrder RunOrderCreate will

  • Create service PublishOrderService (if not exist)

    └── domain_yourdomainname
        └── model
            └── service
                └── service.go
    
  • Inject code into Outport

    type Outport interface {
      service.PublishOrderService
    }
    
  • Inject code into Interactor. It will replace the //! flag

    func (r *runOrderCreateInteractor) Execute(ctx context.Context, req InportRequest) (*InportResponse, error) {
    
      res := &InportResponse{}
    
      // code your usecase definition here ...
    
      publishOrderResponse, err := r.outport.PublishOrder(ctx, service.PublishOrderServiceRequest{})
      if err != nil {
        return nil, err
      }
    
      _ = publishOrderResponse
    
      //!
    
      return res, nil
    }
    

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(inputs ...string) error

Types

type ObjTemplate

type ObjTemplate struct {
	PackagePath string
	ServiceName string
	UsecaseName *string
}

ObjTemplate ...

Jump to

Keyboard shortcuts

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