Documentation ¶
Index ¶
- Constants
- Variables
- func ReplaceURL(str string) string
- type EventType
- type LifeCycle
- type Protocol
- type RegisterType
- type Service
- func (*Service) Descriptor() ([]byte, []int)
- func (p *Service) FullRegistryPath(ps ...string) string
- func (m *Service) GetDomain() string
- func (m *Service) GetName() string
- func (m *Service) GetTopic() string
- func (m *Service) GetVersion() string
- func (p *Service) ID(ps ...string) string
- func (*Service) ProtoMessage()
- func (m *Service) Reset()
- func (m *Service) String() string
- func (p *Service) TrellisName() string
- func (p *Service) TrellisPath(ps ...string) string
- func (m *Service) XXX_DiscardUnknown()
- func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Service) XXX_Merge(src proto.Message)
- func (m *Service) XXX_Size() int
- func (m *Service) XXX_Unmarshal(b []byte) error
Constants ¶
View Source
const ( // headers HeaderXAPI = "X-Api" HeaderXAPIToken = "X-Api-Token" HeaderXClientIP = "X-Client-IP" HeaderXRequestID = "X-Request-ID" HeaderReferer = "Referer" HeaderContentLength = "Content-Length" HeaderContentType = "Content-Type" HeaderCookie = "Cookie" HeaderLocation = "Location" HeaderXForwardedFor = "X-Forwarded-For" HeaderXRealIP = "X-Real-IP" HeaderAuthorization = "Authorization" HeaderOrigin = "Origin" // cors HeaderAccessControlRequestMethod = "Access-Control-Request-Method" HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers" HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin" HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods" HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers" HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials" HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers" HeaderAccessControlMaxAge = "Access-Control-Max-Age" // csrf HeaderStrictTransportSecurity = "Strict-Transport-Security" HeaderXContentTypeOptions = "X-Content-Type-Options" HeaderXXSSProtection = "X-XSS-Protection" HeaderXFrameOptions = "X-Frame-Options" HeaderContentSecurityPolicy = "Content-Security-Policy" HeaderContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only" HeaderXCSRFToken = "X-CSRF-Token" HeaderReferrerPolicy = "Referrer-Policy" )
header keys
View Source
const ( MIMEApplicationJSON = "application/json" MIMEApplicationJSONCharsetUTF8 = MIMEApplicationJSON + "; " + charsetUTF8 MIMEApplicationJavaScript = "application/javascript" MIMEApplicationJavaScriptCharsetUTF8 = MIMEApplicationJavaScript + "; " + charsetUTF8 MIMEApplicationXML = "application/xml" MIMEApplicationXMLCharsetUTF8 = MIMEApplicationXML + "; " + charsetUTF8 MIMETextXML = "text/xml" MIMETextXMLCharsetUTF8 = MIMETextXML + "; " + charsetUTF8 MIMEApplicationForm = "application/x-www-form-urlencoded" MIMEApplicationProtobuf = "application/protobuf" MIMEApplicationMsgpack = "application/msgpack" MIMETextHTML = "text/html" MIMETextHTMLCharsetUTF8 = MIMETextHTML + "; " + charsetUTF8 MIMETextPlain = "text/plain" MIMETextPlainCharsetUTF8 = MIMETextPlain + "; " + charsetUTF8 MIMEMultipartForm = "multipart/form-data" MIMEOctetStream = "application/octet-stream" )
mime keys
Variables ¶
View Source
var EventType_name = map[int32]string{
0: "create",
1: "delete",
2: "update",
}
View Source
var EventType_value = map[string]int32{
"create": 0,
"delete": 1,
"update": 2,
}
View Source
var Protocol_name = map[int32]string{
0: "LOCAL",
1: "GRPC",
2: "HTTP",
3: "QUIC",
4: "UDP",
5: "TCP",
}
View Source
var Protocol_value = map[string]int32{
"LOCAL": 0,
"GRPC": 1,
"HTTP": 2,
"QUIC": 3,
"UDP": 4,
"TCP": 5,
}
View Source
var RegisterType_name = map[int32]string{
0: "memory",
1: "etcd",
}
View Source
var RegisterType_value = map[string]int32{
"memory": 0,
"etcd": 1,
}
Functions ¶
Types ¶
type RegisterType ¶
type RegisterType int32
const ( RegisterType_memory RegisterType = 0 RegisterType_etcd RegisterType = 1 )
func (RegisterType) EnumDescriptor ¶
func (RegisterType) EnumDescriptor() ([]byte, []int)
func (RegisterType) String ¶
func (x RegisterType) String() string
type Service ¶
type Service struct { Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` Topic string `protobuf:"bytes,4,opt,name=topic,proto3" json:"topic,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func ParseService ¶
ParseService parse a string to base service
func (*Service) Descriptor ¶
func (*Service) FullRegistryPath ¶
FullRegistryPath Service full registry path
func (*Service) GetVersion ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) TrellisPath ¶
TrellisPath Service full path
func (*Service) XXX_DiscardUnknown ¶
func (m *Service) XXX_DiscardUnknown()
func (*Service) XXX_Marshal ¶
func (*Service) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.