MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / Message

Interface Message

message/message.go:79–95  ·  view source on GitHub ↗

endregion region Interfaces Message is a message structure for error reporting in ContainerSSH. The actual implementations may differ, but we provide the UserMessage method to construct a message that conforms to this interface.

Source from the content-addressed store, hash-verified

77// Message is a message structure for error reporting in ContainerSSH. The actual implementations may differ, but we
78// provide the UserMessage method to construct a message that conforms to this interface.
79type Message interface {
80 // Error is the Go-compatible error message.
81 Error() string
82 // String returns the string representation of this message.
83 String() string
84
85 // Code is a unique code identifying log messages.
86 Code() string
87 // UserMessage is a message that is safe to print/send to the end user.
88 UserMessage() string
89 // Explanation is the text explanation for the system administrator.
90 Explanation() string
91 // Labels are a set of extra labels for the message containing information.
92 Labels() Labels
93 // Label adds a label to the message.
94 Label(name LabelName, value LabelValue) Message
95}
96
97// WrappingMessage is a message that wraps a different error.
98type WrappingMessage interface {

Callers 26

TestMarshalRemoteAddressFunction · 0.65
StringMethod · 0.65
MarshalTextMethod · 0.65
getReasonMethod · 0.95
getReasonMethod · 0.95
createMessageMethod · 0.65
WriteMethod · 0.65
createLineLJSONMethod · 0.65
wrapAndLogAuthFailureMethod · 0.65
logAuthSuccessfulMethod · 0.65
handleSessionChannelMethod · 0.65

Implementers 3

ErrTooManySessionsinternal/security/handler_ssh.go
messageinternal/sshserver/rejection.go
messagemessage/message.go

Calls

no outgoing calls

Tested by

no test coverage detected