Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
func (*Type) Encode ¶
Example ¶
prefix := "user" key := []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} et, err := extid.NewType(prefix, key) if err != nil { fmt.Println(err) return } for i := 0; i < 5; i++ { fmt.Println(i, et.Encode(int64(i))) }
Output: 0 user_c6a13b37878f5b826f4f8162a1c8d879 1 user_13189a6ae4ab07ae70a3aabd30be99de 2 user_c76e8fcf7ad0fe9b39e083739cbe26c2 3 user_90cb45611c3105c84624b2ac12cb5b74 4 user_79d0782401799c8fd25121e869b5b532
Click to show internal directories.
Click to hide internal directories.