Documentation ¶
Index ¶
- func Buffer() *bytes.Buffer
- func NewLogger(level, encode string) (*zap.Logger, error)
- func PutBuffer(b *bytes.Buffer)
- type Backend
- type Confirmer
- type Context
- type ErrCode
- type Error
- type FetchInput
- type FetchOutput
- type LoggerConfig
- type LoggingEncode
- type LoggingLevel
- type PutInput
- type PutOutput
- type RemoveInput
- type RemoveOutput
- type Resource
- type ResourceType
- type Resources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend interface { Put(*PutInput) (*PutOutput, error) Fetch(*FetchInput) (*FetchOutput, error) Remove(*RemoveInput) (*RemoveOutput, error) }
Backend -
type Context ¶
type Context struct { Log *zap.Logger Validate *validator.Validate Ctx context.Context // contains filtered or unexported fields }
Context -
func NewContext ¶
NewContext -
type LoggerConfig ¶
type LoggerConfig struct { LoggingLevel LoggingLevel LoggingEncode LoggingEncode Out io.Writer NoTimestamp bool // contains filtered or unexported fields }
LoggerConfig store logging configurations
type LoggingEncode ¶
type LoggingEncode string
LoggingEncode -
const ( // LoggingEncJSON - LoggingEncJSON LoggingEncode = "json" // LoggingEncText - LoggingEncText LoggingEncode = "text" // LoggingEncColorText - LoggingEncColorText LoggingEncode = "color" )
type LoggingLevel ¶
type LoggingLevel int
LoggingLevel はloggingのsuppressするlevelを表します. 指定されたlevel未満のlogは出力されません.
const ( // LoggingLvlDebug - LoggingLvlDebug LoggingLevel = iota - 1 // LoggingLvlInfo - LoggingLvlInfo // LoggingLvlWarn - LoggingLvlWarn // LoggingLvlError - LoggingLvlError )
type Resource ¶
type Resource interface { Type() ResourceType URI() string Open() (io.ReadCloser, error) }
Resource -
type ResourceType ¶
type ResourceType int
ResourceType -
const ( InvalidResource ResourceType = iota S3Resource LocalFileResource )
func InspectPath ¶
func InspectPath(path string) ResourceType
NOTE: not sure which layer should have resource type decision responsibility. InspectPath return corresponding resource type.
func (ResourceType) String ¶
func (i ResourceType) String() string
Click to show internal directories.
Click to hide internal directories.