You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

228 lines
6.5 KiB

  1. // Code generated by protoc-gen-go.
  2. // source: Authentication.proto
  3. // DO NOT EDIT!
  4. package proto
  5. import proto1 "github.com/golang/protobuf/proto"
  6. import math "math"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto1.Marshal
  9. var _ = math.Inf
  10. type TokenIdentifier_Kind int32
  11. const (
  12. TokenIdentifier_HBASE_AUTH_TOKEN TokenIdentifier_Kind = 0
  13. )
  14. var TokenIdentifier_Kind_name = map[int32]string{
  15. 0: "HBASE_AUTH_TOKEN",
  16. }
  17. var TokenIdentifier_Kind_value = map[string]int32{
  18. "HBASE_AUTH_TOKEN": 0,
  19. }
  20. func (x TokenIdentifier_Kind) Enum() *TokenIdentifier_Kind {
  21. p := new(TokenIdentifier_Kind)
  22. *p = x
  23. return p
  24. }
  25. func (x TokenIdentifier_Kind) String() string {
  26. return proto1.EnumName(TokenIdentifier_Kind_name, int32(x))
  27. }
  28. func (x *TokenIdentifier_Kind) UnmarshalJSON(data []byte) error {
  29. value, err := proto1.UnmarshalJSONEnum(TokenIdentifier_Kind_value, data, "TokenIdentifier_Kind")
  30. if err != nil {
  31. return err
  32. }
  33. *x = TokenIdentifier_Kind(value)
  34. return nil
  35. }
  36. type AuthenticationKey struct {
  37. Id *int32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
  38. ExpirationDate *int64 `protobuf:"varint,2,req,name=expiration_date" json:"expiration_date,omitempty"`
  39. Key []byte `protobuf:"bytes,3,req,name=key" json:"key,omitempty"`
  40. XXX_unrecognized []byte `json:"-"`
  41. }
  42. func (m *AuthenticationKey) Reset() { *m = AuthenticationKey{} }
  43. func (m *AuthenticationKey) String() string { return proto1.CompactTextString(m) }
  44. func (*AuthenticationKey) ProtoMessage() {}
  45. func (m *AuthenticationKey) GetId() int32 {
  46. if m != nil && m.Id != nil {
  47. return *m.Id
  48. }
  49. return 0
  50. }
  51. func (m *AuthenticationKey) GetExpirationDate() int64 {
  52. if m != nil && m.ExpirationDate != nil {
  53. return *m.ExpirationDate
  54. }
  55. return 0
  56. }
  57. func (m *AuthenticationKey) GetKey() []byte {
  58. if m != nil {
  59. return m.Key
  60. }
  61. return nil
  62. }
  63. type TokenIdentifier struct {
  64. Kind *TokenIdentifier_Kind `protobuf:"varint,1,req,name=kind,enum=proto.TokenIdentifier_Kind" json:"kind,omitempty"`
  65. Username []byte `protobuf:"bytes,2,req,name=username" json:"username,omitempty"`
  66. KeyId *int32 `protobuf:"varint,3,req,name=key_id" json:"key_id,omitempty"`
  67. IssueDate *int64 `protobuf:"varint,4,opt,name=issue_date" json:"issue_date,omitempty"`
  68. ExpirationDate *int64 `protobuf:"varint,5,opt,name=expiration_date" json:"expiration_date,omitempty"`
  69. SequenceNumber *int64 `protobuf:"varint,6,opt,name=sequence_number" json:"sequence_number,omitempty"`
  70. XXX_unrecognized []byte `json:"-"`
  71. }
  72. func (m *TokenIdentifier) Reset() { *m = TokenIdentifier{} }
  73. func (m *TokenIdentifier) String() string { return proto1.CompactTextString(m) }
  74. func (*TokenIdentifier) ProtoMessage() {}
  75. func (m *TokenIdentifier) GetKind() TokenIdentifier_Kind {
  76. if m != nil && m.Kind != nil {
  77. return *m.Kind
  78. }
  79. return TokenIdentifier_HBASE_AUTH_TOKEN
  80. }
  81. func (m *TokenIdentifier) GetUsername() []byte {
  82. if m != nil {
  83. return m.Username
  84. }
  85. return nil
  86. }
  87. func (m *TokenIdentifier) GetKeyId() int32 {
  88. if m != nil && m.KeyId != nil {
  89. return *m.KeyId
  90. }
  91. return 0
  92. }
  93. func (m *TokenIdentifier) GetIssueDate() int64 {
  94. if m != nil && m.IssueDate != nil {
  95. return *m.IssueDate
  96. }
  97. return 0
  98. }
  99. func (m *TokenIdentifier) GetExpirationDate() int64 {
  100. if m != nil && m.ExpirationDate != nil {
  101. return *m.ExpirationDate
  102. }
  103. return 0
  104. }
  105. func (m *TokenIdentifier) GetSequenceNumber() int64 {
  106. if m != nil && m.SequenceNumber != nil {
  107. return *m.SequenceNumber
  108. }
  109. return 0
  110. }
  111. // Serialization of the org.apache.hadoop.security.token.Token class
  112. // Note that this is a Hadoop class, so fields may change!
  113. type Token struct {
  114. // the TokenIdentifier in serialized form
  115. // Note: we can't use the protobuf directly because the Hadoop Token class
  116. // only stores the serialized bytes
  117. Identifier []byte `protobuf:"bytes,1,opt,name=identifier" json:"identifier,omitempty"`
  118. Password []byte `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
  119. Service []byte `protobuf:"bytes,3,opt,name=service" json:"service,omitempty"`
  120. XXX_unrecognized []byte `json:"-"`
  121. }
  122. func (m *Token) Reset() { *m = Token{} }
  123. func (m *Token) String() string { return proto1.CompactTextString(m) }
  124. func (*Token) ProtoMessage() {}
  125. func (m *Token) GetIdentifier() []byte {
  126. if m != nil {
  127. return m.Identifier
  128. }
  129. return nil
  130. }
  131. func (m *Token) GetPassword() []byte {
  132. if m != nil {
  133. return m.Password
  134. }
  135. return nil
  136. }
  137. func (m *Token) GetService() []byte {
  138. if m != nil {
  139. return m.Service
  140. }
  141. return nil
  142. }
  143. // RPC request & response messages
  144. type GetAuthenticationTokenRequest struct {
  145. XXX_unrecognized []byte `json:"-"`
  146. }
  147. func (m *GetAuthenticationTokenRequest) Reset() { *m = GetAuthenticationTokenRequest{} }
  148. func (m *GetAuthenticationTokenRequest) String() string { return proto1.CompactTextString(m) }
  149. func (*GetAuthenticationTokenRequest) ProtoMessage() {}
  150. type GetAuthenticationTokenResponse struct {
  151. Token *Token `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
  152. XXX_unrecognized []byte `json:"-"`
  153. }
  154. func (m *GetAuthenticationTokenResponse) Reset() { *m = GetAuthenticationTokenResponse{} }
  155. func (m *GetAuthenticationTokenResponse) String() string { return proto1.CompactTextString(m) }
  156. func (*GetAuthenticationTokenResponse) ProtoMessage() {}
  157. func (m *GetAuthenticationTokenResponse) GetToken() *Token {
  158. if m != nil {
  159. return m.Token
  160. }
  161. return nil
  162. }
  163. type WhoAmIRequest struct {
  164. XXX_unrecognized []byte `json:"-"`
  165. }
  166. func (m *WhoAmIRequest) Reset() { *m = WhoAmIRequest{} }
  167. func (m *WhoAmIRequest) String() string { return proto1.CompactTextString(m) }
  168. func (*WhoAmIRequest) ProtoMessage() {}
  169. type WhoAmIResponse struct {
  170. Username *string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
  171. AuthMethod *string `protobuf:"bytes,2,opt,name=auth_method" json:"auth_method,omitempty"`
  172. XXX_unrecognized []byte `json:"-"`
  173. }
  174. func (m *WhoAmIResponse) Reset() { *m = WhoAmIResponse{} }
  175. func (m *WhoAmIResponse) String() string { return proto1.CompactTextString(m) }
  176. func (*WhoAmIResponse) ProtoMessage() {}
  177. func (m *WhoAmIResponse) GetUsername() string {
  178. if m != nil && m.Username != nil {
  179. return *m.Username
  180. }
  181. return ""
  182. }
  183. func (m *WhoAmIResponse) GetAuthMethod() string {
  184. if m != nil && m.AuthMethod != nil {
  185. return *m.AuthMethod
  186. }
  187. return ""
  188. }
  189. func init() {
  190. proto1.RegisterEnum("proto.TokenIdentifier_Kind", TokenIdentifier_Kind_name, TokenIdentifier_Kind_value)
  191. }