core

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

type ApiError struct {
	HttpError
	ErrorCode    string `json:"errorCode"`
	ErrorMessage string `json:"errorMsg"`
}

type HttpError

type HttpError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func (HttpError) Error

func (h HttpError) Error() string

func (HttpError) Unwrap

func (h HttpError) Unwrap() error

type Root

type Root struct {
	HostUrl     *string
	OrgId       string
	AuthToUse   *model.ClientAuth
	HttpClient  *http.Client
	Token       *string
	TokenGetter func() (any, error)
	IsSre       bool
}

func (*Root) Delete

func (r *Root) Delete(url *string, reqBody interface{}, dest interface{}) ([]byte, error)

func (*Root) Get

func (r *Root) Get(url *string, queryModel interface{}, dest interface{}) ([]byte, error)

func (*Root) Patch

func (r *Root) Patch(url *string, reqBody interface{}, dest interface{}) ([]byte, error)

func (*Root) Post

func (r *Root) Post(url *string, reqBody interface{}, dest interface{}) ([]byte, error)

func (*Root) Put

func (r *Root) Put(url *string, reqBody interface{}, dest interface{}) ([]byte, error)

type Service

type Service struct {
	Endpoint string
	Api      *Root
}

func NewService

func NewService(hostUrl *string, endPoint string, root *Root) *Service

Jump to

Keyboard shortcuts

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