gofound_sdk_go

package module
v0.0.0-...-53399b3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 10 Imported by: 0

README

AdamTyn/gofound-sdk-go

  • About

    本项目为 https://github.com/sea-team/gofound 的Go版本的SDK
    应网友要求,填补一下原项目作者的真空期
    无任何第三方依赖,全部来自Go的官方库
    本仓库为全网首发,代码遵从MIT开源协议
    
  • Release Note

    • [2022-08-05] 发布第1个草率版,请诸君浅尝
  • Todo

    • 支持 tracing
    • 支持 protobufhttp 两种协议
    • 支持配置中心
  • Contact Me

Documentation

Index

Constants

View Source
const (
	RouteIndex       = "/api/index"
	RouteIndexBatch  = "/api/index/batch"
	RouteIndexRemove = "/api/index/remove"
	RouteQuery       = "/api/query"
	RouteStatus      = "/api/status"
	RouteDBDrop      = "/api/db/drop"
	RouteWordCut     = "/api/word/cut"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(c *conf.Config, cli *http.Client) *Client

func (*Client) DBDrop

func (c *Client) DBDrop(ctx context.Context, in *req.BaseReq) ([]byte, error)

func (Client) Do

func (c Client) Do(request *http.Request) ([]byte, error)

func (*Client) Index

func (c *Client) Index(ctx context.Context, in *req.IndexReq) ([]byte, error)

func (*Client) IndexBatch

func (c *Client) IndexBatch(ctx context.Context, in *req.IndexBatchReq) ([]byte, error)

func (*Client) IndexRemove

func (c *Client) IndexRemove(ctx context.Context, in *req.IndexRemoveReq) ([]byte, error)

func (*Client) Query

func (c *Client) Query(ctx context.Context, in *req.QueryReq) ([]byte, error)

func (*Client) Status

func (c *Client) Status(ctx context.Context, in *req.BaseReq) ([]byte, error)

func (*Client) WordCut

func (c *Client) WordCut(ctx context.Context, in *req.BaseReq) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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