wiki

package
v0.5.25 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package wiki

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Connect

func Connect(ctx context.Context, connector Connector) (*Client, error)

func (*Client) Conn

func (c *Client) Conn() *grpc.ClientConn

Conn returns the underlying *grpc.ClientConn this Client was built over, so a caller can construct another service client (e.g. chatclient.New(c.Conn())) sharing the same connection instead of dialing twice - gRPC multiplexes services over one connection by name, so there is no conflict.

func (*Client) Ctx

func (c *Client) Ctx() context.Context

func (*Client) FileSytem

func (c *Client) FileSytem(ctx context.Context, web string) FilesystemWrapper

func (*Client) Transaction

func (c *Client) Transaction(ctx context.Context, web string) (*Transaction, error)

type Connector

type Connector interface {
	PrivateKey() (sgo.PrivateKey, error)
	Dial(context.Context) (*grpc.ClientConn, error)
}

func InsecureLocalConnector

func InsecureLocalConnector(addr string) Connector

InsecureLocalConnector connects to addr (host:port) with no TLS and no key of its own - use this when addr is already a trusted local endpoint (e.g. a relay.SimpleProxy forwarder's -listen address) rather than a server this process must itself authenticate to.

type FilesystemWrapper

type FilesystemWrapper interface {
	// List file info in a directory
	LsInfo(ctx context.Context, req *filesystem.LsInfoRequest) ([]filesystem.FileInfo, error)

	// Read file content, supports line offset and limit
	Read(ctx context.Context, req *filesystem.ReadRequest) (*filesystem.FileContent, error)

	// Search for matching content in files
	GrepRaw(ctx context.Context, req *filesystem.GrepRequest) ([]filesystem.GrepMatch, error)

	// Match files by glob pattern
	GlobInfo(ctx context.Context, req *filesystem.GlobInfoRequest) ([]filesystem.FileInfo, error)

	// Write file content
	Write(ctx context.Context, req *filesystem.WriteRequest) error

	// Edit file content (string replacement)
	Edit(ctx context.Context, req *filesystem.EditRequest) error
}

type Form

type Form struct {
	// name of Topic defining the Form
	FormTopic string
	Row       []string
}

type Preference

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

func (*Preference) Proto

func (p *Preference) Proto() []*pbw.Preference

type Transaction

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

func (*Transaction) Commit

func (tx *Transaction) Commit() (*pbw.PutTopicsResponse, error)

func (*Transaction) Topic

func (tx *Transaction) Topic(
	mustBeNew bool,
	appendIfPresent bool,
	parentTopic string,
	topic string,
	body string,
	comment string,
	form *Form,
	preference *Preference,
) error

Topic - put a topic

func (*Transaction) Upload

func (tx *Transaction) Upload(topicName string, fileName string, comment string, reader io.ReadCloser) error

Upload - upload files together with the topic

Source Files

  • eino.go
  • form.go
  • insecurelocal.go
  • preference.go
  • put.go
  • wiki.go

Directories

Path Synopsis
Package chatclient is a real gRPC client for chat.v1.ChatService (see chatserver's own doc comment for the server side, and proto/chat/v1/chat.proto for the RPC surface itself).
Package chatclient is a real gRPC client for chat.v1.ChatService (see chatserver's own doc comment for the server side, and proto/chat/v1/chat.proto for the RPC surface itself).
Package chattui is a terminal UI for chat.v1.ChatService, built on chatclient (the same gRPC client cmd/wiki-client's HTTP chat routes use - see wiki/remote/chat.go) - so this is a second, terminal-based front end for the same chat feature, not a reimplementation of it.
Package chattui is a terminal UI for chat.v1.ChatService, built on chatclient (the same gRPC client cmd/wiki-client's HTTP chat routes use - see wiki/remote/chat.go) - so this is a second, terminal-based front end for the same chat feature, not a reimplementation of it.
Package ledger wraps a wiki client for doing accounting.
Package ledger wraps a wiki client for doing accounting.

Jump to

Keyboard shortcuts

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