jsonplaceholder

package
v0.114.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Code generated by sysl DO NOT EDIT.

Code generated by sysl DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for jsonplaceholder API

func NewClient

func NewClient(client *http.Client, serviceURL string) *Client

NewClient for jsonplaceholder

func (*Client) GetTodos

func (s *Client) GetTodos(ctx context.Context, req *GetTodosRequest) (*TodosResponse, error)

GetTodos ...

type GetTodosRequest

type GetTodosRequest struct {
	ID int64
}

GetTodosRequest ...

type Service

type Service interface {
	GetTodos(ctx context.Context, req *GetTodosRequest) (*TodosResponse, error)
}

Service interface for jsonplaceholder

type TodosResponse

type TodosResponse struct {
	Completed *bool    `json:"completed,omitempty"`
	ID        *float64 `json:"id,omitempty"`
	Title     *string  `json:"title,omitempty"`
	UserId    *float64 `json:"userId,omitempty"`
}

TodosResponse ...

func (*TodosResponse) Validate

func (s *TodosResponse) Validate() error

*TodosResponse validator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL