Documentation
¶
Overview ¶
Package names caries the names database
Index ¶
- Constants
- func BaddressCount() int
- func ClearCache()
- func ClearCustomNames()
- func CreateName(dbType DatabaseType, chain string, name *types.Name) (err error)
- func CustomWriteNames(chain string, dryRun bool) (err error)
- func LoadNamesMap(chain string, parts types.Parts, terms []string) (map[base.Address]types.Name, error)
- func ReadName(dbType DatabaseType, chain string, address base.Address) (name *types.Name)
- func RegularWriteNames(chain string, dryRun bool) (err error)
- func RemoveName(dbType DatabaseType, chain string, address base.Address) (name *types.Name, err error)
- func SetDeleted(dbType DatabaseType, chain string, address base.Address, deleted bool) (name *types.Name, err error)
- func UpdateName(dbType DatabaseType, chain string, name *types.Name) (err error)
- type DatabaseType
- type NameReader
- type NameWriter
Constants ¶
View Source
const ( NameWriterCsv nameWriterFormat = iota NameWriterTsv )
Variables ¶
This section is empty.
Functions ¶
func BaddressCount ¶
func BaddressCount() int
func ClearCustomNames ¶
func ClearCustomNames()
func CreateName ¶
func CreateName(dbType DatabaseType, chain string, name *types.Name) (err error)
func CustomWriteNames ¶
func LoadNamesMap ¶
func LoadNamesMap(chain string, parts types.Parts, terms []string) (map[base.Address]types.Name, error)
LoadNamesMap loads the names from the cache and returns a map of names
func RegularWriteNames ¶
func RemoveName ¶
func SetDeleted ¶
func UpdateName ¶
func UpdateName(dbType DatabaseType, chain string, name *types.Name) (err error)
Types ¶
type DatabaseType ¶
type DatabaseType string
const ( DatabaseRegular DatabaseType = "names.tab" DatabaseCustom DatabaseType = "names_custom.tab" DatabaseDryRun DatabaseType = "<dryrun>" )
type NameReader ¶
type NameReader struct {
// contains filtered or unexported fields
}
func NewNameReader ¶
func NewNameReader(source io.Reader) (NameReader, error)
type NameWriter ¶
type NameWriter struct {
WriteHeader bool
Format nameWriterFormat
Header []string
// contains filtered or unexported fields
}
func NewNameWriter ¶
func NewNameWriter(destWriter io.Writer) *NameWriter
func (*NameWriter) Error ¶
func (w *NameWriter) Error() error
func (*NameWriter) Flush ¶
func (w *NameWriter) Flush()
Click to show internal directories.
Click to hide internal directories.