operations

package
v0.0.0-...-fd80b3d Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package operations contains an rpc client-server pair for maintenance operations on the language server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOpServer

func NewOpServer(db *database.DB, addr string) *rpc.Server

NewOpServer creates a new rpc server for maintenance operations on the language server.

Types

type Client

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

func NewClient

func NewClient(addr string) (*Client, error)

NewClient creates an rpc client for maintenance operations on the language server.

func (*Client) Dump

func (c *Client) Dump() ([]string, error)

Dump returns a dump of the whole language database.

func (*Client) Insert

func (c *Client) Insert(comment string, language *language.Language) error

Insert inserts a new language into the language database, with the desired comment.

type Dump

type Dump []string

type InsertArgs

type InsertArgs struct {
	Comment   string
	Code      string
	ISO_639_1 string
	ISO_639_3 string
	WikiData  string
}

type OpRpcServer

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

func (*OpRpcServer) Dump

func (s *OpRpcServer) Dump(nothing bool, d *Dump) error

func (*OpRpcServer) Insert

func (s *OpRpcServer) Insert(args InsertArgs, nothing *bool) error

Directories

Path Synopsis
Package language-dump contains the language-dump executable.
Package language-dump contains the language-dump executable.
Package language-insert contains the language-insert executable.
Package language-insert contains the language-insert executable.

Jump to

Keyboard shortcuts

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