searchsrv1

package
v0.0.0-...-1fd911f Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SearchServerProtocol

func SearchServerProtocol(i SearchServerInterface) rpc.Protocol

Types

type DeleteIndexArg

type DeleteIndexArg struct {
	TlfID FolderID   `codec:"tlfID" json:"tlfID"`
	DocID DocumentID `codec:"docID" json:"docID"`
}

type DocumentID

type DocumentID string

func (DocumentID) String

func (docID DocumentID) String() string

type FolderID

type FolderID string

func (FolderID) String

func (folderID FolderID) String() string

type GetKeyGensArg

type GetKeyGensArg struct {
	TlfID FolderID `codec:"tlfID" json:"tlfID"`
}

type RegisterTlfIfNotExistsArg

type RegisterTlfIfNotExistsArg struct {
	TlfID        FolderID `codec:"tlfID" json:"tlfID"`
	LenSalt      int      `codec:"lenSalt" json:"lenSalt"`
	FpRate       float64  `codec:"fpRate" json:"fpRate"`
	NumUniqWords int64    `codec:"numUniqWords" json:"numUniqWords"`
}

type RenameIndexArg

type RenameIndexArg struct {
	TlfID FolderID   `codec:"tlfID" json:"tlfID"`
	Orig  DocumentID `codec:"orig" json:"orig"`
	Curr  DocumentID `codec:"curr" json:"curr"`
}

type SearchServerClient

type SearchServerClient struct {
	Cli rpc.GenericClient
}

func (SearchServerClient) DeleteIndex

func (c SearchServerClient) DeleteIndex(ctx context.Context, __arg DeleteIndexArg) (err error)

func (SearchServerClient) GetKeyGens

func (c SearchServerClient) GetKeyGens(ctx context.Context, tlfID FolderID) (res []int, err error)

func (SearchServerClient) RegisterTlfIfNotExists

func (c SearchServerClient) RegisterTlfIfNotExists(ctx context.Context, __arg RegisterTlfIfNotExistsArg) (res TlfInfo, err error)

func (SearchServerClient) RenameIndex

func (c SearchServerClient) RenameIndex(ctx context.Context, __arg RenameIndexArg) (err error)

func (SearchServerClient) SearchWord

func (c SearchServerClient) SearchWord(ctx context.Context, __arg SearchWordArg) (res []DocumentID, err error)

func (SearchServerClient) WriteIndex

func (c SearchServerClient) WriteIndex(ctx context.Context, __arg WriteIndexArg) (err error)

type SearchServerInterface

type SearchServerInterface interface {
	WriteIndex(context.Context, WriteIndexArg) error
	RenameIndex(context.Context, RenameIndexArg) error
	DeleteIndex(context.Context, DeleteIndexArg) error
	GetKeyGens(context.Context, FolderID) ([]int, error)
	SearchWord(context.Context, SearchWordArg) ([]DocumentID, error)
	RegisterTlfIfNotExists(context.Context, RegisterTlfIfNotExistsArg) (TlfInfo, error)
}

type SearchWordArg

type SearchWordArg struct {
	TlfID     FolderID            `codec:"tlfID" json:"tlfID"`
	Trapdoors map[string]Trapdoor `codec:"trapdoors" json:"trapdoors"`
}

type TlfInfo

type TlfInfo struct {
	Salts [][]byte `codec:"salts" json:"salts"`
	Size  int64    `codec:"size" json:"size"`
}

type Trapdoor

type Trapdoor struct {
	Codeword [][]byte `codec:"codeword" json:"codeword"`
}

type WriteIndexArg

type WriteIndexArg struct {
	TlfID       FolderID   `codec:"tlfID" json:"tlfID"`
	SecureIndex []byte     `codec:"secureIndex" json:"secureIndex"`
	DocID       DocumentID `codec:"docID" json:"docID"`
}

Jump to

Keyboard shortcuts

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