mirror of
				https://github.com/go-micro/go-micro.git
				synced 2025-10-30 23:27:41 +02:00 
			
		
		
		
	api honours naming convention of other interfaces
This commit is contained in:
		| @@ -14,7 +14,7 @@ import ( | ||||
|  | ||||
| // The gateway interface provides a way to | ||||
| // create composable API gateways | ||||
| type Gateway interface { | ||||
| type Api interface { | ||||
| 	// Initialise options | ||||
| 	Init(...Option) error | ||||
| 	// Get the options | ||||
| @@ -172,7 +172,7 @@ func WithEndpoint(e *Endpoint) server.HandlerOption { | ||||
| 	return server.EndpointMetadata(e.Name, Encode(e)) | ||||
| } | ||||
|  | ||||
| // NewGateway returns a new api gateway | ||||
| func NewGateway(opts ...Option) Gateway { | ||||
| 	return newGateway(opts...) | ||||
| // NewApi returns a new api gateway | ||||
| func NewApi(opts ...Option) Api { | ||||
| 	return newApi(opts...) | ||||
| } | ||||
|   | ||||
| @@ -16,7 +16,7 @@ type api struct { | ||||
| 	server server.Server | ||||
| } | ||||
|  | ||||
| func newGateway(opts ...Option) Gateway { | ||||
| func newApi(opts ...Option) Api { | ||||
| 	options := NewOptions(opts...) | ||||
|  | ||||
| 	rtr := options.Router | ||||
|   | ||||
		Reference in New Issue
	
	Block a user