apiserver

package
v1.5.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

README

APIServer Module Architecture

apiserver architecture

Interfaces

Typically, it includes user interfaces, web services, and so on.

  • API

Define the Restful API and perform basic validation on user input parameters.

  • DTO

The carrier of data transmission. Here does not have any business logic inside, and the internal domain models can be isolated from the outside world through DTO.

  • Assembler

Realize the mutual conversion and data exchange between DTO and DO.

Event

Asynchronous task module. All workers under this module only run on the master node. Domain layer can be called.

Domain

Code related to core business logic.

  • Service

A domain service is a piece of business logic composed of multiple entities. You can put all domain services in the aggregate in one domain service class, or you can design each domain service as a class.

  • Repository

Usually includes repository interface and repository implementation method. In order to facilitate the splitting and combination of aggregates, the principle is set: one aggregate corresponds to one repository. For example, save user information to a database.

  • Model

Database model entity.

Infrastructure

Provide general technical basic services for other layers, such as:

  • Database
  • Cache
  • Kube Client
  • MQ

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer interface {
	Run(context.Context, chan error) error
	BuildRestfulConfig() (*restfulSpec.Config, error)
}

APIServer interface for call api server

func New

func New(cfg config.Config) (a APIServer)

New create api server with config data

Jump to

Keyboard shortcuts

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