Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cnf/structhash
/ functions
Functions
39 in github.com/cnf/structhash
⨍
Functions
39
◇
Types & classes
18
↓ 21 callers
Function
Dump
Dump takes a data structure and returns its byte representation. This can be useful if you need to use your own hashing function or formatter.
structhash.go:46
↓ 13 callers
Function
Hash
Hash takes a data structure and returns a hash string of that data structure at the version asked. This function uses md5 hashing function and defaul
structhash.go:40
↓ 10 callers
Method
Error
()
structhash.go:99
↓ 4 callers
Function
Md5
Md5 takes a data structure and returns its md5 hash. This is a shorthand for md5.Sum(Dump(c, version)).
structhash.go:52
↓ 4 callers
Function
benchDataSimple
()
structhash_benchmark_test.go:25
↓ 2 callers
Function
Version
Version returns the version of the supplied hash as an integer or -1 on failure
structhash.go:18
↓ 2 callers
Function
benchDataFull
()
structhash_benchmark_test.go:29
↓ 2 callers
Function
benchDataTags
()
structhash_benchmark_test.go:45
↓ 2 callers
Function
writeValue
(buf *bytes.Buffer, val reflect.Value, fltr structFieldFilter)
structhash.go:105
↓ 1 callers
Method
Len
()
structhash.go:85
↓ 1 callers
Function
dataSetup
()
structhash_test.go:79
↓ 1 callers
Function
filterField
(f reflect.StructField, i *item, version int)
structhash.go:214
↓ 1 callers
Function
formatValue
(val reflect.Value, fltr structFieldFilter)
structhash.go:203
↓ 1 callers
Function
serialize
(object interface{}, version int)
structhash.go:267
Function
BenchmarkFullDump
(b *testing.B)
structhash_benchmark_test.go:73
Function
BenchmarkFullJSON
(b *testing.B)
structhash_benchmark_test.go:65
Function
BenchmarkSimpleDump
(b *testing.B)
structhash_benchmark_test.go:57
Function
BenchmarkSimpleJSON
(b *testing.B)
structhash_benchmark_test.go:49
Function
BenchmarkTagsDump
(b *testing.B)
structhash_benchmark_test.go:89
Function
BenchmarkTagsJSON
(b *testing.B)
structhash_benchmark_test.go:81
Function
ExampleDump
()
structhash_examples_test.go:93
Function
ExampleHash
()
structhash_examples_test.go:11
Function
ExampleHash_tags
()
structhash_examples_test.go:46
Function
ExampleVersion
()
structhash_examples_test.go:130
Function
ExampleVersion_errors
()
structhash_examples_test.go:138
Method
Less
(i, j int)
structhash.go:93
Method
Normalize
()
structhash_test.go:75
Method
Serialize
()
structhash_test.go:71
Function
Sha1
Sha1 takes a data structure and returns its sha1 hash. This is a shorthand for sha1.Sum(Dump(c, version)).
structhash.go:59
Function
Sha256
Sha256 takes a data structure and returns its SHA 256 hash. This is a shorthand for sha256.Sum256(Dump(c, version)).
structhash.go:66
Function
Sha512
Sha512 takes a data structure and returns its SHA 512 hash. This is a shorthand for sha512.Sum512(Dump(c, version)).
structhash.go:73
Method
Swap
(i, j int)
structhash.go:89
Function
TestHash
(t *testing.T)
structhash_test.go:100
Function
TestInterfaceField
(t *testing.T)
structhash_test.go:202
Function
TestMethod
(t *testing.T)
structhash_test.go:271
Function
TestMethodPanic
(t *testing.T)
structhash_test.go:285
Function
TestNils
(t *testing.T)
structhash_test.go:156
Function
TestTags
(t *testing.T)
structhash_test.go:132
Function
TestUnexportedFields
(t *testing.T)
structhash_test.go:180