Documentation ¶
Overview ¶
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- type AbstractEvent
- func (ae *AbstractEvent) GetBody() []byte
- func (ae *AbstractEvent) GetContentType() string
- func (ae *AbstractEvent) GetField(key string) interface{}
- func (ae *AbstractEvent) GetFieldByteSlice(key string) []byte
- func (ae *AbstractEvent) GetFieldInt(key string) (int, error)
- func (ae *AbstractEvent) GetFieldString(key string) string
- func (ae *AbstractEvent) GetFields() map[string]interface{}
- func (ae *AbstractEvent) GetHeader(key string) interface{}
- func (ae *AbstractEvent) GetHeaderByteSlice(key string) []byte
- func (ae *AbstractEvent) GetHeaderString(key string) string
- func (ae *AbstractEvent) GetHeaders() map[string]interface{}
- func (ae *AbstractEvent) GetID() ID
- func (ae *AbstractEvent) GetMethod() string
- func (ae *AbstractEvent) GetPath() string
- func (ae *AbstractEvent) GetSize() int
- func (ae *AbstractEvent) GetSource() SourceInfoProvider
- func (ae *AbstractEvent) GetTimestamp() time.Time
- func (ae *AbstractEvent) GetURL() string
- func (ae *AbstractEvent) GetVersion() int
- func (ae *AbstractEvent) SetID(id ID)
- func (ae *AbstractEvent) SetSourceProvider(sourceInfoProvider SourceInfoProvider)
- type AbstractSync
- type Async
- type Context
- type DataBinding
- type ErrorWithStatusCode
- type Event
- type ID
- type Logger
- type Response
- type SourceInfoProvider
- type Sync
- type WithStatusCode
Constants ¶
This section is empty.
Variables ¶
var ErrAccepted = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrAlreadyReported = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrBadGateway = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrBadRequest = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrConflict = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrCreated = ErrorWithStatusCode{/* contains filtered or unexported fields */}
wrapped errors
var ErrExpectationFailed = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrFailedDependency = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrForbidden = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrFound = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrGatewayTimeout = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrGone = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrHTTPVersionNotSupported = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrIMUsed = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrInsufficientStorage = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrInternalServerError = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrLengthRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrLocked = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrLoopDetected = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrMethodNotAllowed = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrMovedPermanently = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrMultiStatus = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrMultipleChoices = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrNetworkAuthenticationRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrNoContent = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrNonAuthoritativeInfo = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrNotAcceptable = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrNotExtended = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrNotFound = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrNotImplemented = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrNotModified = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrPartialContent = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrPaymentRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrPermanentRedirect = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrPreconditionFailed = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrPreconditionRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrProxyAuthRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrRequestEntityTooLarge = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrRequestHeaderFieldsTooLarge = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrRequestTimeout = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrRequestURITooLong = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrRequestedRangeNotSatisfiable = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrResetContent = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrSeeOther = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrTeapot = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrTemporaryRedirect = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrTooManyRequests = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrUnprocessableEntity = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrUnsupported = errors.New("Event does not support this interface")
var ErrUnsupportedMediaType = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrUpgradeRequired = ErrorWithStatusCode{/* contains filtered or unexported fields */}
var ErrUseProxy = ErrorWithStatusCode{/* contains filtered or unexported fields */}
Functions ¶
This section is empty.
Types ¶
type AbstractEvent ¶
type AbstractEvent struct {
// contains filtered or unexported fields
}
func (*AbstractEvent) GetBody ¶
func (ae *AbstractEvent) GetBody() []byte
func (*AbstractEvent) GetContentType ¶
func (ae *AbstractEvent) GetContentType() string
func (*AbstractEvent) GetField ¶
func (ae *AbstractEvent) GetField(key string) interface{}
func (*AbstractEvent) GetFieldByteSlice ¶
func (ae *AbstractEvent) GetFieldByteSlice(key string) []byte
func (*AbstractEvent) GetFieldInt ¶
func (ae *AbstractEvent) GetFieldInt(key string) (int, error)
func (*AbstractEvent) GetFieldString ¶
func (ae *AbstractEvent) GetFieldString(key string) string
func (*AbstractEvent) GetFields ¶
func (ae *AbstractEvent) GetFields() map[string]interface{}
func (*AbstractEvent) GetHeader ¶
func (ae *AbstractEvent) GetHeader(key string) interface{}
func (*AbstractEvent) GetHeaderByteSlice ¶
func (ae *AbstractEvent) GetHeaderByteSlice(key string) []byte
func (*AbstractEvent) GetHeaderString ¶
func (ae *AbstractEvent) GetHeaderString(key string) string
func (*AbstractEvent) GetHeaders ¶
func (ae *AbstractEvent) GetHeaders() map[string]interface{}
func (*AbstractEvent) GetID ¶
func (ae *AbstractEvent) GetID() ID
func (*AbstractEvent) GetMethod ¶
func (ae *AbstractEvent) GetMethod() string
func (*AbstractEvent) GetPath ¶
func (ae *AbstractEvent) GetPath() string
func (*AbstractEvent) GetSize ¶
func (ae *AbstractEvent) GetSize() int
func (*AbstractEvent) GetSource ¶
func (ae *AbstractEvent) GetSource() SourceInfoProvider
func (*AbstractEvent) GetTimestamp ¶
func (ae *AbstractEvent) GetTimestamp() time.Time
func (*AbstractEvent) GetURL ¶
func (ae *AbstractEvent) GetURL() string
func (*AbstractEvent) GetVersion ¶
func (ae *AbstractEvent) GetVersion() int
func (*AbstractEvent) SetID ¶
func (ae *AbstractEvent) SetID(id ID)
func (*AbstractEvent) SetSourceProvider ¶
func (ae *AbstractEvent) SetSourceProvider(sourceInfoProvider SourceInfoProvider)
type AbstractSync ¶
type AbstractSync struct {
AbstractEvent
}
func (*AbstractSync) GetHostAddress ¶
func (as *AbstractSync) GetHostAddress() string
func (*AbstractSync) GetQuery ¶
func (as *AbstractSync) GetQuery() map[string]interface{}
func (*AbstractSync) GetRemoteAddress ¶
func (as *AbstractSync) GetRemoteAddress() string
func (*AbstractSync) GetWorkflowStep ¶
func (as *AbstractSync) GetWorkflowStep() string
type Context ¶
type Context struct { Logger Logger DataBinding map[string]DataBinding }
type DataBinding ¶
type DataBinding interface { }
type ErrorWithStatusCode ¶
type ErrorWithStatusCode struct {
// contains filtered or unexported fields
}
func (*ErrorWithStatusCode) StatusCode ¶
func (ewsc *ErrorWithStatusCode) StatusCode() int
type Event ¶
type Event interface { GetVersion() int GetID() ID SetID(id ID) SetSourceProvider(sourceInfoProvider SourceInfoProvider) GetSource() SourceInfoProvider GetContentType() string GetBody() []byte GetSize() int GetHeader(key string) interface{} GetHeaderByteSlice(key string) []byte GetHeaderString(key string) string GetHeaders() map[string]interface{} GetField(key string) interface{} GetFieldByteSlice(key string) []byte GetFieldString(key string) string GetFieldInt(key string) (int, error) GetFields() map[string]interface{} GetTimestamp() time.Time GetPath() string GetURL() string GetMethod() string }
type Logger ¶
type Logger interface { // emit a log entry of a given verbosity. the first argument may be an object, a string // or a format string. in case of the latter, the following varargs are passed // to a formatter (e.g. fmt.Sprintf) Error(format interface{}, vars ...interface{}) Warn(format interface{}, vars ...interface{}) Info(format interface{}, vars ...interface{}) Debug(format interface{}, vars ...interface{}) // emit a structured log entry. example: // // l.InfoWith("The message", // "first-key", "first-value", // "second-key", 2) // ErrorWith(format interface{}, vars ...interface{}) WarnWith(format interface{}, vars ...interface{}) InfoWith(format interface{}, vars ...interface{}) DebugWith(format interface{}, vars ...interface{}) // flushes buffered logs, if applicable Flush() // returns a child logger, if underlying logger supports hierarchal logging GetChild(name string) Logger }
type SourceInfoProvider ¶
type WithStatusCode ¶
type WithStatusCode interface {
StatusCode() int
}