Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerateRequest ¶
type GenerateRequest struct { // type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit) Type string `json:"type"` }
type GenerateResponse ¶
type IdService ¶
type IdService struct {
// contains filtered or unexported fields
}
func NewIdService ¶
func (*IdService) Generate ¶
func (t *IdService) Generate(request *GenerateRequest) (*GenerateResponse, error)
Generate a unique ID. Defaults to uuid.
func (*IdService) Types ¶
func (t *IdService) Types(request *TypesRequest) (*TypesResponse, error)
List the types of IDs available. No query params needed.
type TypesRequest ¶
type TypesRequest struct { }
type TypesResponse ¶
type TypesResponse struct {
Types []string `json:"types"`
}
Click to show internal directories.
Click to hide internal directories.