package
0.4.5
Repository: https://github.com/russellluo/kun.git
Documentation: pkg.go.dev

# README

usersvc

This example illustrates how to apply Argument aggregation to struct fields.

Generate the code

$ go generate

Test the server

Run the server:

$ go run cmd/main.go
2021/11/14 18:13:15 transport=HTTP addr=:8080

Create a user:

$ curl -XPOST 'http://localhost:8080/users?name=Tracey&age=1'
{"Name":"Tracey","Age":1,"IP":"127.0.0.1"}

Create a user with the X-Forwarded-For header:

$ curl -H 'X-Forwarded-For: 192.168.0.1' -XPOST 'http://localhost:8080/users?name=Tracey&age=1'
{"Name":"Tracey","Age":1,"IP":"192.168.0.1"}

# Packages

No description provided by the author

# Functions

MakeEndpointOfCreateUser creates the endpoint for s.CreateUser.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ValidateCreateUserRequest creates a validator for CreateUserRequest.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
IPCodec is used to encode and decode an IP.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author