Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
d36da842
Commit
d36da842
authored
Jan 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/zodb/zodbtools: Minor godoc cosmetics
parent
36bb9b1e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
go/zodb/zodbtools/catobj.go
go/zodb/zodbtools/catobj.go
+3
-3
go/zodb/zodbtools/dump.go
go/zodb/zodbtools/dump.go
+5
-5
go/zodb/zodbtools/info.go
go/zodb/zodbtools/info.go
+4
-4
go/zodb/zodbtools/main.go
go/zodb/zodbtools/main.go
+1
-1
No files found.
go/zodb/zodbtools/catobj.go
View file @
d36da842
// Copyright (C) 2017 Nexedi SA and Contributors.
// Copyright (C) 2017
-2019
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// it under the terms of the GNU General Public License version 3, or (at your
...
@@ -49,7 +49,7 @@ func Catobj(ctx context.Context, w io.Writer, stor zodb.IStorage, xid zodb.Xid)
...
@@ -49,7 +49,7 @@ func Catobj(ctx context.Context, w io.Writer, stor zodb.IStorage, xid zodb.Xid)
return
err
return
err
}
}
// Dumpobj dumps content of one ZODB object with zodbdump-like header
// Dumpobj dumps content of one ZODB object with zodbdump-like header
.
func
Dumpobj
(
ctx
context
.
Context
,
w
io
.
Writer
,
stor
zodb
.
IStorage
,
xid
zodb
.
Xid
,
hashOnly
bool
)
error
{
func
Dumpobj
(
ctx
context
.
Context
,
w
io
.
Writer
,
stor
zodb
.
IStorage
,
xid
zodb
.
Xid
,
hashOnly
bool
)
error
{
var
objInfo
zodb
.
DataInfo
var
objInfo
zodb
.
DataInfo
...
...
go/zodb/zodbtools/dump.go
View file @
d36da842
// Copyright (C) 2016-201
7
Nexedi SA and Contributors.
// Copyright (C) 2016-201
9
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// This program is free software: you can Use, Study, Modify and Redistribute
...
@@ -67,7 +67,7 @@ import (
...
@@ -67,7 +67,7 @@ import (
)
)
// dumper dumps zodb record to a writer
// dumper dumps zodb record to a writer
.
type
dumper
struct
{
type
dumper
struct
{
W
io
.
Writer
W
io
.
Writer
HashOnly
bool
// whether to dump only hashes of data without content
HashOnly
bool
// whether to dump only hashes of data without content
...
@@ -80,7 +80,7 @@ type dumper struct {
...
@@ -80,7 +80,7 @@ type dumper struct {
var
_LF
=
[]
byte
{
'\n'
}
var
_LF
=
[]
byte
{
'\n'
}
// DumpData dumps one data record
// DumpData dumps one data record
.
func
(
d
*
dumper
)
DumpData
(
datai
*
zodb
.
DataInfo
)
(
err
error
)
{
func
(
d
*
dumper
)
DumpData
(
datai
*
zodb
.
DataInfo
)
(
err
error
)
{
// XXX do we need this context ?
// XXX do we need this context ?
// see for rationale in similar place in DumpTxn
// see for rationale in similar place in DumpTxn
...
@@ -139,7 +139,7 @@ func (d *dumper) DumpData(datai *zodb.DataInfo) (err error) {
...
@@ -139,7 +139,7 @@ func (d *dumper) DumpData(datai *zodb.DataInfo) (err error) {
return
err
return
err
}
}
// DumpTxn dumps one transaction record
// DumpTxn dumps one transaction record
.
func
(
d
*
dumper
)
DumpTxn
(
ctx
context
.
Context
,
txni
*
zodb
.
TxnInfo
,
dataIter
zodb
.
IDataIterator
)
(
err
error
)
{
func
(
d
*
dumper
)
DumpTxn
(
ctx
context
.
Context
,
txni
*
zodb
.
TxnInfo
,
dataIter
zodb
.
IDataIterator
)
(
err
error
)
{
// XXX do we need this context ?
// XXX do we need this context ?
// rationale: dataIter.NextData() if error in db - will include db context
// rationale: dataIter.NextData() if error in db - will include db context
...
@@ -185,7 +185,7 @@ func (d *dumper) DumpTxn(ctx context.Context, txni *zodb.TxnInfo, dataIter zodb.
...
@@ -185,7 +185,7 @@ func (d *dumper) DumpTxn(ctx context.Context, txni *zodb.TxnInfo, dataIter zodb.
return
err
return
err
}
}
// Dump dumps transaction records in between tidMin..tidMax
// Dump dumps transaction records in between tidMin..tidMax
.
func
(
d
*
dumper
)
Dump
(
ctx
context
.
Context
,
stor
zodb
.
IStorage
,
tidMin
,
tidMax
zodb
.
Tid
)
error
{
func
(
d
*
dumper
)
Dump
(
ctx
context
.
Context
,
stor
zodb
.
IStorage
,
tidMin
,
tidMax
zodb
.
Tid
)
error
{
var
txni
*
zodb
.
TxnInfo
var
txni
*
zodb
.
TxnInfo
var
dataIter
zodb
.
IDataIterator
var
dataIter
zodb
.
IDataIterator
...
...
go/zodb/zodbtools/info.go
View file @
d36da842
// Copyright (C) 2017 Nexedi SA and Contributors.
// Copyright (C) 2017
-2019
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// This program is free software: you can Use, Study, Modify and Redistribute
// it under the terms of the GNU General Public License version 3, or (at your
// it under the terms of the GNU General Public License version 3, or (at your
...
@@ -32,7 +32,7 @@ import (
...
@@ -32,7 +32,7 @@ import (
"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb"
)
)
// paramFunc is a function to retrieve 1 storage parameter
// paramFunc is a function to retrieve 1 storage parameter
.
type
paramFunc
func
(
ctx
context
.
Context
,
stor
zodb
.
IStorage
)
(
string
,
error
)
type
paramFunc
func
(
ctx
context
.
Context
,
stor
zodb
.
IStorage
)
(
string
,
error
)
var
infov
=
[]
struct
{
name
string
;
getParam
paramFunc
}
{
var
infov
=
[]
struct
{
name
string
;
getParam
paramFunc
}
{
...
@@ -56,7 +56,7 @@ func init() {
...
@@ -56,7 +56,7 @@ func init() {
}
}
}
}
// Info prints general information about a ZODB storage
// Info prints general information about a ZODB storage
.
func
Info
(
ctx
context
.
Context
,
w
io
.
Writer
,
stor
zodb
.
IStorage
,
parameterv
[]
string
)
error
{
func
Info
(
ctx
context
.
Context
,
w
io
.
Writer
,
stor
zodb
.
IStorage
,
parameterv
[]
string
)
error
{
wantnames
:=
false
wantnames
:=
false
if
len
(
parameterv
)
==
0
{
if
len
(
parameterv
)
==
0
{
...
...
go/zodb/zodbtools/main.go
View file @
d36da842
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
// See COPYING file for full licensing terms.
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
// See https://www.nexedi.com/licensing for rationale and options.
// Package zodbtools provides tools for managing ZODB databases
// Package zodbtools provides tools for managing ZODB databases
.
package
zodbtools
package
zodbtools
import
"lab.nexedi.com/kirr/go123/prog"
import
"lab.nexedi.com/kirr/go123/prog"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment