Documentation
¶
Index ¶
Constants ¶
View Source
const ( RouteEmployees string = "/employees" RouteEmployeesSearch string = RouteEmployees + "/search" RouteEmployeesEmpNo string = RouteEmployees + "/{" + PathEmpNo + "}" RouteEmployeesEmpNof string = RouteEmployees + "/%d" )
View Source
const ParameterEmpNos string = "emp_nos"
View Source
const PathEmpNo string = "EmpNo"
Variables ¶
View Source
var ( Version string GitCommit string GitBranch string )
These variables are populated at build time REFERENCE: https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-version-information-for-go-applications to find where the variables are...
go tool nm ./app | grep app
Functions ¶
This section is empty.
Types ¶
type Employee ¶
type Employee struct {
EmpNo int64 `json:"emp_no"` //this is actually an int32, but the types are compatible
BirthDate int64 `json:"birth_date"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Gender string `json:"gender"` //this is actually an enum, but not worth the effort
HireDate int64 `json:"hire_date"`
}
func (*Employee) MarshalBinary ¶
func (*Employee) UnmarshalBinary ¶
type EmployeePartial ¶
type EmployeePartial struct {
BirthDate *int64 `json:"birth_date,omitempty,string"`
FirstName *string `json:"first_name,omitempty"`
LastName *string `json:"last_name,omitempty"`
Gender *string `json:"gender,omitempty"` //this is actually an enum, but not worth the effort
HireDate *int64 `json:"hire_date,omitempty,string"`
}
func (*EmployeePartial) MarshalBinary ¶
func (e *EmployeePartial) MarshalBinary() ([]byte, error)
func (*EmployeePartial) UnmarshalBinary ¶
func (e *EmployeePartial) UnmarshalBinary(data []byte) error
type EmployeeSearch ¶
type EmployeeSearch struct {
EmpNos []int64 `json:"emp_nos"`
FirstNames []string `json:"first_names"`
LastNames []string `json:"last_names"`
Gender string `json:"gender"`
}
func (*EmployeeSearch) FromParams ¶
func (e *EmployeeSearch) FromParams(params url.Values)
func (*EmployeeSearch) ToParams ¶
func (e *EmployeeSearch) ToParams() url.Values
type Request ¶
type Request struct {
EmployeePartial EmployeePartial `json:"employee_partial"`
}
Click to show internal directories.
Click to hide internal directories.