github.com/pavlo67/common@v0.5.3/common/server_http/endpoint.go (about)

     1  package server_http
     2  
     3  import (
     4  	"encoding/json"
     5  
     6  	"github.com/pavlo67/common/common/joiner"
     7  )
     8  
     9  type EndpointDescription struct {
    10  	InternalKey joiner.InterfaceKey `json:",omitempty"`
    11  	Method      string              `json:",omitempty"`
    12  	PathParams  []string            `json:",omitempty"`
    13  	QueryParams []string            `json:",omitempty"`
    14  	BodyParams  json.RawMessage     `json:",omitempty"`
    15  }
    16  
    17  type EndpointKey = joiner.InterfaceKey
    18  type EndpointsSettled map[EndpointKey]EndpointSettled
    19  
    20  type EndpointSettled struct {
    21  	Path     string
    22  	Tags     []string `json:",omitempty"`
    23  	Produces []string `json:",omitempty"`
    24  	*Endpoint
    25  }
    26  
    27  type Endpoint struct {
    28  	EndpointDescription
    29  	WorkerHTTP
    30  }