icp

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultServer = "https://icp.wjlin0.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ContentTypeName  string `json:"contentTypeName"`
	Domain           string `json:"domain"`
	DomainID         int64  `json:"domainId"`
	LeaderName       string `json:"leaderName"`
	LimitAccess      string `json:"limitAccess"`
	MainID           int64  `json:"mainId"`
	MainLicence      string `json:"mainLicence"`
	NatureName       string `json:"natureName"`
	ServiceID        int64  `json:"serviceId"`
	ServiceLicence   string `json:"serviceLicence"`
	UnitName         string `json:"unitName"`
	UpdateRecordTime string `json:"updateRecordTime"` // 使用 time.Time 解析日期
}

Entry 表示成功响应中的具体数据项

type Options

type Options struct {
	ProxyURL string
	Server   string
	Retries  int
}

type Response

type Response struct {
	Status  string   `json:"status"`
	Data    []*Entry `json:"data,omitempty"`    // 成功时包含的数据,omitempty 表示当值为空时忽略
	Message string   `json:"message,omitempty"` // 错误时包含的详细信息
}

Response 表示通用响应结构体

type Runner

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

func NewRunner

func NewRunner(opts *Options) *Runner

func (*Runner) Search

func (r *Runner) Search(keyword string) ([]*Entry, error)

func (*Runner) SearchByUnitName

func (r *Runner) SearchByUnitName(unitName string) ([]*Entry, error)

SearchByUnitName SearchBy 根据第一次搜索 unitName 获取所有的信息

Jump to

Keyboard shortcuts

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