sessiontokenclient

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithBaseURL = v4.WithBaseURL

WithBaseURL 覆盖默认上游 base url。

View Source
var WithHTTPClient = v4.WithHTTPClient

WithHTTPClient 覆盖默认 HTTP Client。

View Source
var WithRetrySchedule = v4.WithRetrySchedule

WithRetrySchedule 自定义上游重试间隔。

Functions

This section is empty.

Types

type Client

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

Client 负责根据配置选择对应版本的 Zhihu API handler。

func NewClient

func NewClient(cfg *config.ZhihuSessionTokenConfig, manager sessiontoken.SessionTokenClient, log *logger.Logger, opts ...Option) (*Client, error)

NewClient 根据配置创建对应版本的 Zhihu API handler。

func (*Client) RegisterRoutes

func (c *Client) RegisterRoutes(mux *http.ServeMux, apiToken string) error

RegisterRoutes 委托给具体版本实现。

func (*Client) Version

func (c *Client) Version() string

Version 返回当前使用的 API 版本。

type Option

type Option = v4.Option

Option 透传给版本实现,当前等价于 v4.Option。

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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