service_doc

package
v1.3.3-beta Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc

type Doc struct {
	ID         string
	Creator    string
	Updater    string
	Doc        string
	UpdateTime time.Time
	CreateTime time.Time
}

type DocCommit

type DocCommit struct {
	Content string `json:"content"`
}

type IDocCommitService

type IDocCommitService interface {
	CommitDoc(ctx context.Context, serviceId string, data *Doc) error
	GetDocCommit(ctx context.Context, commitId string) (*commit.Commit[DocCommit], error)
	// LatestDocCommit 获取最新文档
	LatestDocCommit(ctx context.Context, serviceId string) (*commit.Commit[DocCommit], error)
	ListLatestDocCommit(ctx context.Context, serviceIds ...string) ([]*commit.Commit[DocCommit], error)
	ListDocCommit(ctx context.Context, commitIds ...string) ([]*commit.Commit[DocCommit], error)
}

type IDocService

type IDocService interface {
	Get(ctx context.Context, sid string) (*Doc, error)
	Save(ctx context.Context, input *SaveDoc) error
	List(ctx context.Context, sids ...string) ([]*Doc, error)
	Map(ctx context.Context, sids ...string) (map[string]*Doc, error)
	IDocCommitService
}

type SaveDoc

type SaveDoc struct {
	Sid string
	Doc string
}

Jump to

Keyboard shortcuts

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