client

package
v0.0.0-...-eee7c91 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key string) string

Types

type Advice

type Advice struct {
	Advice     string `json:"advice"`
	Created_At string `json:"created_at"`
	UserId     string `json:"user_id,omitempty"`
}

type AdviceClient

type AdviceClient struct {
}

func (*AdviceClient) CreateUpdateAdvice

func (ac *AdviceClient) CreateUpdateAdvice(advice Advice, c *context.Context, method string) error

func (*AdviceClient) GetAdvice

func (ac *AdviceClient) GetAdvice(id string, c *context.Context) (*Advice, error)

type User

type User struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	Age      int32  `json:"age"`
	Greeting string `json:"greeting"`
}

type UserClient

type UserClient struct {
}

func (*UserClient) CreateUpdateUser

func (uc *UserClient) CreateUpdateUser(user UserWithDetails, c *context.Context, method string) (string, error)

func (*UserClient) GetUserDetails

func (uc *UserClient) GetUserDetails(id string, c *context.Context) (*UserDetails, error)

func (*UserClient) GetUsers

func (uc *UserClient) GetUsers(c *context.Context) (*[]User, error)

type UserDetails

type UserDetails struct {
	Salary int32  `json:"salary"`
	Power  string `json:"power"`
	Advice
}

type UserWithDetails

type UserWithDetails struct {
	User
	UserDetails
}

Jump to

Keyboard shortcuts

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