-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Extract runtime types Co-authored-by: ZenGround0 <[email protected]>
- Loading branch information
1 parent
001afac
commit bbd537e
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cbor | ||
|
||
import "io" | ||
|
||
// These interfaces are intended to match those from whyrusleeping/cbor-gen, such that code generated from that | ||
// system is automatically usable here (but not mandatory). | ||
type Marshaler interface { | ||
MarshalCBOR(w io.Writer) error | ||
} | ||
|
||
type Unmarshaler interface { | ||
UnmarshalCBOR(r io.Reader) error | ||
} | ||
|
||
type Er interface { | ||
Marshaler | ||
Unmarshaler | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package log | ||
|
||
// Specifies importance of message, LogLevel numbering is consistent with the uber-go/zap package. | ||
type LogLevel int | ||
|
||
const ( | ||
// DebugLevel logs are typically voluminous, and are usually disabled in | ||
// production. | ||
DEBUG LogLevel = iota - 1 | ||
// InfoLevel is the default logging priority. | ||
INFO | ||
// WarnLevel logs are more important than Info, but don't need individual | ||
// human review. | ||
WARN | ||
// ErrorLevel logs are high-priority. If an application is running smoothly, | ||
// it shouldn't generate any error-level logs. | ||
ERROR | ||
) |