@@ -22,6 +22,7 @@ module Twirp {
22
22
23
23
/**
24
24
* A *.twirp.go file generated by Twirp.
25
+ *
25
26
* This file contains all the types representing protobuf services and should have a companion *.pb.go file.
26
27
*/
27
28
class ServicesGeneratedFile extends File {
@@ -66,7 +67,7 @@ module Twirp {
66
67
override string getName ( ) { result = namedType .getName ( ) }
67
68
68
69
/**
69
- * Returns the named type on top of this interface type
70
+ * Gets the named type on top of this interface type.
70
71
*/
71
72
NamedType getNamedType ( ) { result = namedType }
72
73
}
@@ -87,7 +88,7 @@ module Twirp {
87
88
}
88
89
89
90
/**
90
- * A Twirp server
91
+ * A Twirp server.
91
92
*/
92
93
class ServiceServerType extends NamedType {
93
94
ServiceServerType ( ) {
@@ -101,22 +102,23 @@ module Twirp {
101
102
}
102
103
103
104
/**
104
- * A Twirp function to construct a Client
105
+ * A Twirp function to construct a Client.
105
106
*/
106
107
class ClientConstructor extends Function {
107
108
ClientConstructor ( ) {
108
109
exists ( ServiceClientType c |
109
110
this .getName ( ) .toLowerCase ( ) = "new" + c .getName ( ) .toLowerCase ( ) and
110
- this .getParameter ( 0 ) . getType ( ) instanceof StringType and
111
+ this .getParameterType ( 0 ) instanceof StringType and
111
112
this .getParameterType ( 1 ) .getName ( ) = "HTTPClient" and
112
113
this .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
113
114
)
114
115
}
115
116
}
116
117
117
118
/**
118
- * A Twirp function to construct a Server
119
- * Its first argument should be an implementation of the service interface
119
+ * A Twirp function to construct a Server.
120
+ *
121
+ * Its first argument should be an implementation of the service interface.
120
122
*/
121
123
class ServerConstructor extends Function {
122
124
ServerConstructor ( ) {
@@ -129,7 +131,7 @@ module Twirp {
129
131
}
130
132
131
133
/**
132
- * An SSRF sink for the Client constructor
134
+ * An SSRF sink for the Client constructor.
133
135
*/
134
136
class ClientRequestUrlAsSink extends RequestForgery:: Sink {
135
137
ClientRequestUrlAsSink ( ) {
@@ -145,7 +147,7 @@ module Twirp {
145
147
}
146
148
147
149
/**
148
- * A service handler
150
+ * A service handler.
149
151
*/
150
152
class ServiceHandler extends Method {
151
153
ServiceHandler ( ) {
0 commit comments