agora

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildUserAgent

func BuildUserAgent() string

BuildUserAgent returns the user agent string used by the application. e.g. "AgoraRESTClient Language/go LanguageVersion/1.22.2 Arch/arm64 OS/darwin SDKVersion/0.0.2"

Types

type BaseResponse

type BaseResponse struct {
	RawResponse    *http.Response
	RawBody        []byte
	HttpStatusCode int
}

func (*BaseResponse) GetRequestID

func (r *BaseResponse) GetRequestID() string

func (*BaseResponse) UnmarshalToTarget

func (r *BaseResponse) UnmarshalToTarget(target interface{}) error

UnmarshalToTarget unmarshal body into target var successful if err is nil

type Config

type Config struct {
	AppID       string
	HttpTimeout time.Duration
	Credential  auth.Credential

	DomainArea domain.Area
	Logger     log.Logger
}

type GatewayErr

type GatewayErr struct {
	Code int
	Msg  string
}

func NewGatewayErr

func NewGatewayErr(code int, msg string) *GatewayErr

func (*GatewayErr) Error

func (g *GatewayErr) Error() string

type InternalErr

type InternalErr struct {
	ErrMsg string
}

func NewInternalErr

func NewInternalErr(msg string) *InternalErr

func (*InternalErr) Error

func (i *InternalErr) Error() string

type ResponseInterface

type ResponseInterface interface {
	IsSuccess() bool
}

type RetryErr

type RetryErr struct {
	Err error
	// contains filtered or unexported fields
}

func NewRetryErr

func NewRetryErr(needRetry bool, err error) *RetryErr

func (*RetryErr) Error

func (r *RetryErr) Error() string

func (*RetryErr) NeedRetry

func (r *RetryErr) NeedRetry() bool

func (*RetryErr) Unwrap

func (r *RetryErr) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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