utils

package
v0.5.0-test1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertStringToInt

func ConvertStringToInt(input string) (int, error)

func GetRateLimitPerSecond

func GetRateLimitPerSecond(info RateLimitInfo) int

Types

type PagingInfo

type PagingInfo struct {
	Next  int
	Last  int
	First int
	Prev  int
}

func GetPagingFromLinkHeader

func GetPagingFromLinkHeader(link string) (PagingInfo, error)

type RateLimitInfo

type RateLimitInfo struct {
	Date      time.Time
	ResetTime time.Time
	Remaining int
}

func ConvertRateLimitInfo

func ConvertRateLimitInfo(date string, resetTime string, remaining string) (RateLimitInfo, error)

Jump to

Keyboard shortcuts

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