From f9e7ea3ef59bc399c1c081ca2979533cdde4ffe6 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Thu, 1 Apr 2021 16:17:32 -0500 Subject: [PATCH 1/8] changes to contacts proto are copied to apis repo --- .github/workflows/publish-proto.yml | 26 ++++++++++++++++++++++++++ copy.bara.sky | 23 +++++++++++++++++++++++ pkg/pb/contacts.proto | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-proto.yml create mode 100644 copy.bara.sky diff --git a/.github/workflows/publish-proto.yml b/.github/workflows/publish-proto.yml new file mode 100644 index 0000000..2603639 --- /dev/null +++ b/.github/workflows/publish-proto.yml @@ -0,0 +1,26 @@ +name: Publish Protobufs +on: + push: + branches: + - master + - main + - publishProtos # debug only, remove + paths: + - pkg/pb/contacts.proto +jobs: + test: + name: Publish Protobuf Changes + runs-on: ubuntu-latest + timeout-minutes: 5 + defaults: + run: + working-directory: ./src/github.com/${{ github.repository }} + steps: + - uses: actions/checkout@v1 + - uses: wilmol/copybara-action@v1 + with: + git_name: wilmol + git_email: willjoemolloy@gmail.com + ssh_key: ${{ secrets.CODEBARABOT_DWELLS }} + ssh_known_hosts: ${{ secrets.CODEBARABOT_KNOWN_HOSTS }} + path: copy.bara.sky diff --git a/copy.bara.sky b/copy.bara.sky new file mode 100644 index 0000000..f5fe99f --- /dev/null +++ b/copy.bara.sky @@ -0,0 +1,23 @@ +core.workflow( + name = "default", + origin = git.github_origin( + url = "https://github.com/infobloxopen/atlas-contacts-app.git", + ref = "master", + ), + destination = git.destination( + url = "https://github.com/infobloxopen/apis.git", + fetch = "main", + push = "main", + ), + + origin_files = glob(["pkg/pb/*.proto"]), + + # Copy everything but don't remove a README_INTERNAL.txt file if it exists. + destination_files = glob(["atlas/example/contacts/**"], exclude = []), + + authoring = authoring.pass_thru("Codebara "), + + transformations = [ + core.move("pkg/pb", "atlas/example/contacts/v1") + ], +) \ No newline at end of file diff --git a/pkg/pb/contacts.proto b/pkg/pb/contacts.proto index 37d041e..187ede6 100644 --- a/pkg/pb/contacts.proto +++ b/pkg/pb/contacts.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package api.contacts; +package api.examples.contacts.v1; import "google/protobuf/field_mask.proto"; import "google/api/annotations.proto"; From 09157ef3dba8c9ace1f321a6882ff162f9e54ba0 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Thu, 1 Apr 2021 16:20:41 -0500 Subject: [PATCH 2/8] regenerate protobufs --- pkg/pb/contacts.pb.go | 1818 +++++++++++++++++------- pkg/pb/contacts.pb.gorm.go | 1783 ++++++++++++++++++------ pkg/pb/contacts.pb.gw.go | 1292 +++++++++++++---- pkg/pb/contacts.pb.validate.go | 2401 +++++++++++++++----------------- 4 files changed, 4755 insertions(+), 2539 deletions(-) diff --git a/pkg/pb/contacts.pb.go b/pkg/pb/contacts.pb.go index 65637ff..c4643b9 100644 --- a/pkg/pb/contacts.pb.go +++ b/pkg/pb/contacts.pb.go @@ -1,69 +1,22 @@ -// Code generated by protoc-gen-go. -// source: pkg/pb/contacts.proto -// DO NOT EDIT! - -/* -Package pb is a generated protocol buffer package. - -It is generated from these files: - pkg/pb/contacts.proto - -It has these top-level messages: - Profile - CreateProfileRequest - CreateProfileResponse - ReadProfileRequest - ReadProfileResponse - UpdateProfileRequest - UpdateProfileResponse - DeleteProfileRequest - DeleteProfileResponse - ListProfileRequest - ListProfilesResponse - Group - CreateGroupRequest - CreateGroupResponse - ReadGroupRequest - ReadGroupResponse - UpdateGroupRequest - UpdateGroupResponse - DeleteGroupRequest - DeleteGroupResponse - ListGroupRequest - ListGroupsResponse - Contact - Email - Address - CreateContactRequest - CreateContactResponse - ReadContactRequest - ReadContactResponse - UpdateContactRequest - UpdateContactResponse - DeleteContactRequest - DeleteContactResponse - ListContactsResponse - SMSRequest - SMSResponse - ListContactRequest -*/ -package pb +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "google.golang.org/genproto/protobuf/field_mask" -import _ "google.golang.org/genproto/googleapis/api/annotations" -import _ "github.com/lyft/protoc-gen-validate/validate" -import _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" -import _ "github.com/infobloxopen/protoc-gen-gorm/options" -import gorm_types "github.com/infobloxopen/protoc-gen-gorm/types" -import infoblox_api "github.com/infobloxopen/atlas-app-toolkit/query" -import atlas_rpc "github.com/infobloxopen/atlas-app-toolkit/rpc/resource" +package pb import ( - context "golang.org/x/net/context" + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + query "github.com/infobloxopen/atlas-app-toolkit/query" + resource "github.com/infobloxopen/atlas-app-toolkit/rpc/resource" + _ "github.com/infobloxopen/protoc-gen-gorm/options" + types "github.com/infobloxopen/protoc-gen-gorm/types" + _ "github.com/lyft/protoc-gen-validate/validate" + _ "google.golang.org/genproto/googleapis/api/annotations" + field_mask "google.golang.org/genproto/protobuf/field_mask" grpc "google.golang.org/grpc" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -75,22 +28,45 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type Profile struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Notes string `protobuf:"bytes,3,opt,name=notes" json:"notes,omitempty"` - Contacts []*Contact `protobuf:"bytes,4,rep,name=contacts" json:"contacts,omitempty"` - Groups []*Group `protobuf:"bytes,5,rep,name=groups" json:"groups,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Notes string `protobuf:"bytes,3,opt,name=notes,proto3" json:"notes,omitempty"` + Contacts []*Contact `protobuf:"bytes,4,rep,name=contacts,proto3" json:"contacts,omitempty"` + Groups []*Group `protobuf:"bytes,5,rep,name=groups,proto3" json:"groups,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Profile) Reset() { *m = Profile{} } +func (m *Profile) String() string { return proto.CompactTextString(m) } +func (*Profile) ProtoMessage() {} +func (*Profile) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{0} +} + +func (m *Profile) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Profile.Unmarshal(m, b) +} +func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Profile.Marshal(b, m, deterministic) +} +func (m *Profile) XXX_Merge(src proto.Message) { + xxx_messageInfo_Profile.Merge(m, src) +} +func (m *Profile) XXX_Size() int { + return xxx_messageInfo_Profile.Size(m) +} +func (m *Profile) XXX_DiscardUnknown() { + xxx_messageInfo_Profile.DiscardUnknown(m) } -func (m *Profile) Reset() { *m = Profile{} } -func (m *Profile) String() string { return proto.CompactTextString(m) } -func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Profile proto.InternalMessageInfo -func (m *Profile) GetId() *atlas_rpc.Identifier { +func (m *Profile) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -126,13 +102,36 @@ func (m *Profile) GetGroups() []*Group { } type CreateProfileRequest struct { - Payload *Profile `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` + Payload *Profile `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CreateProfileRequest) Reset() { *m = CreateProfileRequest{} } -func (m *CreateProfileRequest) String() string { return proto.CompactTextString(m) } -func (*CreateProfileRequest) ProtoMessage() {} -func (*CreateProfileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *CreateProfileRequest) Reset() { *m = CreateProfileRequest{} } +func (m *CreateProfileRequest) String() string { return proto.CompactTextString(m) } +func (*CreateProfileRequest) ProtoMessage() {} +func (*CreateProfileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{1} +} + +func (m *CreateProfileRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateProfileRequest.Unmarshal(m, b) +} +func (m *CreateProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateProfileRequest.Marshal(b, m, deterministic) +} +func (m *CreateProfileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateProfileRequest.Merge(m, src) +} +func (m *CreateProfileRequest) XXX_Size() int { + return xxx_messageInfo_CreateProfileRequest.Size(m) +} +func (m *CreateProfileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateProfileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateProfileRequest proto.InternalMessageInfo func (m *CreateProfileRequest) GetPayload() *Profile { if m != nil { @@ -142,13 +141,36 @@ func (m *CreateProfileRequest) GetPayload() *Profile { } type CreateProfileResponse struct { - Result *Profile `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Profile `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CreateProfileResponse) Reset() { *m = CreateProfileResponse{} } -func (m *CreateProfileResponse) String() string { return proto.CompactTextString(m) } -func (*CreateProfileResponse) ProtoMessage() {} -func (*CreateProfileResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (m *CreateProfileResponse) Reset() { *m = CreateProfileResponse{} } +func (m *CreateProfileResponse) String() string { return proto.CompactTextString(m) } +func (*CreateProfileResponse) ProtoMessage() {} +func (*CreateProfileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{2} +} + +func (m *CreateProfileResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateProfileResponse.Unmarshal(m, b) +} +func (m *CreateProfileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateProfileResponse.Marshal(b, m, deterministic) +} +func (m *CreateProfileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateProfileResponse.Merge(m, src) +} +func (m *CreateProfileResponse) XXX_Size() int { + return xxx_messageInfo_CreateProfileResponse.Size(m) +} +func (m *CreateProfileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateProfileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateProfileResponse proto.InternalMessageInfo func (m *CreateProfileResponse) GetResult() *Profile { if m != nil { @@ -158,15 +180,38 @@ func (m *CreateProfileResponse) GetResult() *Profile { } type ReadProfileRequest struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReadProfileRequest) Reset() { *m = ReadProfileRequest{} } -func (m *ReadProfileRequest) String() string { return proto.CompactTextString(m) } -func (*ReadProfileRequest) ProtoMessage() {} -func (*ReadProfileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *ReadProfileRequest) Reset() { *m = ReadProfileRequest{} } +func (m *ReadProfileRequest) String() string { return proto.CompactTextString(m) } +func (*ReadProfileRequest) ProtoMessage() {} +func (*ReadProfileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{3} +} -func (m *ReadProfileRequest) GetId() *atlas_rpc.Identifier { +func (m *ReadProfileRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReadProfileRequest.Unmarshal(m, b) +} +func (m *ReadProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReadProfileRequest.Marshal(b, m, deterministic) +} +func (m *ReadProfileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReadProfileRequest.Merge(m, src) +} +func (m *ReadProfileRequest) XXX_Size() int { + return xxx_messageInfo_ReadProfileRequest.Size(m) +} +func (m *ReadProfileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReadProfileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReadProfileRequest proto.InternalMessageInfo + +func (m *ReadProfileRequest) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -174,13 +219,36 @@ func (m *ReadProfileRequest) GetId() *atlas_rpc.Identifier { } type ReadProfileResponse struct { - Result *Profile `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Profile `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReadProfileResponse) Reset() { *m = ReadProfileResponse{} } -func (m *ReadProfileResponse) String() string { return proto.CompactTextString(m) } -func (*ReadProfileResponse) ProtoMessage() {} -func (*ReadProfileResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *ReadProfileResponse) Reset() { *m = ReadProfileResponse{} } +func (m *ReadProfileResponse) String() string { return proto.CompactTextString(m) } +func (*ReadProfileResponse) ProtoMessage() {} +func (*ReadProfileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{4} +} + +func (m *ReadProfileResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReadProfileResponse.Unmarshal(m, b) +} +func (m *ReadProfileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReadProfileResponse.Marshal(b, m, deterministic) +} +func (m *ReadProfileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReadProfileResponse.Merge(m, src) +} +func (m *ReadProfileResponse) XXX_Size() int { + return xxx_messageInfo_ReadProfileResponse.Size(m) +} +func (m *ReadProfileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReadProfileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReadProfileResponse proto.InternalMessageInfo func (m *ReadProfileResponse) GetResult() *Profile { if m != nil { @@ -190,13 +258,36 @@ func (m *ReadProfileResponse) GetResult() *Profile { } type UpdateProfileRequest struct { - Payload *Profile `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` + Payload *Profile `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateProfileRequest) Reset() { *m = UpdateProfileRequest{} } +func (m *UpdateProfileRequest) String() string { return proto.CompactTextString(m) } +func (*UpdateProfileRequest) ProtoMessage() {} +func (*UpdateProfileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{5} } -func (m *UpdateProfileRequest) Reset() { *m = UpdateProfileRequest{} } -func (m *UpdateProfileRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateProfileRequest) ProtoMessage() {} -func (*UpdateProfileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (m *UpdateProfileRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateProfileRequest.Unmarshal(m, b) +} +func (m *UpdateProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateProfileRequest.Marshal(b, m, deterministic) +} +func (m *UpdateProfileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateProfileRequest.Merge(m, src) +} +func (m *UpdateProfileRequest) XXX_Size() int { + return xxx_messageInfo_UpdateProfileRequest.Size(m) +} +func (m *UpdateProfileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateProfileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateProfileRequest proto.InternalMessageInfo func (m *UpdateProfileRequest) GetPayload() *Profile { if m != nil { @@ -206,13 +297,36 @@ func (m *UpdateProfileRequest) GetPayload() *Profile { } type UpdateProfileResponse struct { - Result *Profile `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Profile `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateProfileResponse) Reset() { *m = UpdateProfileResponse{} } +func (m *UpdateProfileResponse) String() string { return proto.CompactTextString(m) } +func (*UpdateProfileResponse) ProtoMessage() {} +func (*UpdateProfileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{6} +} + +func (m *UpdateProfileResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateProfileResponse.Unmarshal(m, b) +} +func (m *UpdateProfileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateProfileResponse.Marshal(b, m, deterministic) +} +func (m *UpdateProfileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateProfileResponse.Merge(m, src) +} +func (m *UpdateProfileResponse) XXX_Size() int { + return xxx_messageInfo_UpdateProfileResponse.Size(m) +} +func (m *UpdateProfileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateProfileResponse.DiscardUnknown(m) } -func (m *UpdateProfileResponse) Reset() { *m = UpdateProfileResponse{} } -func (m *UpdateProfileResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateProfileResponse) ProtoMessage() {} -func (*UpdateProfileResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +var xxx_messageInfo_UpdateProfileResponse proto.InternalMessageInfo func (m *UpdateProfileResponse) GetResult() *Profile { if m != nil { @@ -222,15 +336,38 @@ func (m *UpdateProfileResponse) GetResult() *Profile { } type DeleteProfileRequest struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteProfileRequest) Reset() { *m = DeleteProfileRequest{} } -func (m *DeleteProfileRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteProfileRequest) ProtoMessage() {} -func (*DeleteProfileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (m *DeleteProfileRequest) Reset() { *m = DeleteProfileRequest{} } +func (m *DeleteProfileRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteProfileRequest) ProtoMessage() {} +func (*DeleteProfileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{7} +} + +func (m *DeleteProfileRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteProfileRequest.Unmarshal(m, b) +} +func (m *DeleteProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteProfileRequest.Marshal(b, m, deterministic) +} +func (m *DeleteProfileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteProfileRequest.Merge(m, src) +} +func (m *DeleteProfileRequest) XXX_Size() int { + return xxx_messageInfo_DeleteProfileRequest.Size(m) +} +func (m *DeleteProfileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteProfileRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteProfileRequest proto.InternalMessageInfo -func (m *DeleteProfileRequest) GetId() *atlas_rpc.Identifier { +func (m *DeleteProfileRequest) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -238,47 +375,93 @@ func (m *DeleteProfileRequest) GetId() *atlas_rpc.Identifier { } type DeleteProfileResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteProfileResponse) Reset() { *m = DeleteProfileResponse{} } -func (m *DeleteProfileResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteProfileResponse) ProtoMessage() {} -func (*DeleteProfileResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (m *DeleteProfileResponse) Reset() { *m = DeleteProfileResponse{} } +func (m *DeleteProfileResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteProfileResponse) ProtoMessage() {} +func (*DeleteProfileResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{8} +} + +func (m *DeleteProfileResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteProfileResponse.Unmarshal(m, b) +} +func (m *DeleteProfileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteProfileResponse.Marshal(b, m, deterministic) +} +func (m *DeleteProfileResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteProfileResponse.Merge(m, src) +} +func (m *DeleteProfileResponse) XXX_Size() int { + return xxx_messageInfo_DeleteProfileResponse.Size(m) +} +func (m *DeleteProfileResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteProfileResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteProfileResponse proto.InternalMessageInfo type ListProfileRequest struct { - Filter *infoblox_api.Filtering `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` - OrderBy *infoblox_api.Sorting `protobuf:"bytes,2,opt,name=order_by,json=orderBy" json:"order_by,omitempty"` - Fields *infoblox_api.FieldSelection `protobuf:"bytes,3,opt,name=fields" json:"fields,omitempty"` - Paging *infoblox_api.Pagination `protobuf:"bytes,4,opt,name=paging" json:"paging,omitempty"` + Filter *query.Filtering `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + OrderBy *query.Sorting `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + Fields *query.FieldSelection `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields,omitempty"` + Paging *query.Pagination `protobuf:"bytes,4,opt,name=paging,proto3" json:"paging,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListProfileRequest) Reset() { *m = ListProfileRequest{} } +func (m *ListProfileRequest) String() string { return proto.CompactTextString(m) } +func (*ListProfileRequest) ProtoMessage() {} +func (*ListProfileRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{9} +} + +func (m *ListProfileRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListProfileRequest.Unmarshal(m, b) +} +func (m *ListProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListProfileRequest.Marshal(b, m, deterministic) +} +func (m *ListProfileRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListProfileRequest.Merge(m, src) +} +func (m *ListProfileRequest) XXX_Size() int { + return xxx_messageInfo_ListProfileRequest.Size(m) +} +func (m *ListProfileRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListProfileRequest.DiscardUnknown(m) } -func (m *ListProfileRequest) Reset() { *m = ListProfileRequest{} } -func (m *ListProfileRequest) String() string { return proto.CompactTextString(m) } -func (*ListProfileRequest) ProtoMessage() {} -func (*ListProfileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +var xxx_messageInfo_ListProfileRequest proto.InternalMessageInfo -func (m *ListProfileRequest) GetFilter() *infoblox_api.Filtering { +func (m *ListProfileRequest) GetFilter() *query.Filtering { if m != nil { return m.Filter } return nil } -func (m *ListProfileRequest) GetOrderBy() *infoblox_api.Sorting { +func (m *ListProfileRequest) GetOrderBy() *query.Sorting { if m != nil { return m.OrderBy } return nil } -func (m *ListProfileRequest) GetFields() *infoblox_api.FieldSelection { +func (m *ListProfileRequest) GetFields() *query.FieldSelection { if m != nil { return m.Fields } return nil } -func (m *ListProfileRequest) GetPaging() *infoblox_api.Pagination { +func (m *ListProfileRequest) GetPaging() *query.Pagination { if m != nil { return m.Paging } @@ -286,13 +469,36 @@ func (m *ListProfileRequest) GetPaging() *infoblox_api.Pagination { } type ListProfilesResponse struct { - Results []*Profile `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` + Results []*Profile `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListProfilesResponse) Reset() { *m = ListProfilesResponse{} } +func (m *ListProfilesResponse) String() string { return proto.CompactTextString(m) } +func (*ListProfilesResponse) ProtoMessage() {} +func (*ListProfilesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{10} +} + +func (m *ListProfilesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListProfilesResponse.Unmarshal(m, b) +} +func (m *ListProfilesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListProfilesResponse.Marshal(b, m, deterministic) +} +func (m *ListProfilesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListProfilesResponse.Merge(m, src) +} +func (m *ListProfilesResponse) XXX_Size() int { + return xxx_messageInfo_ListProfilesResponse.Size(m) +} +func (m *ListProfilesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListProfilesResponse.DiscardUnknown(m) } -func (m *ListProfilesResponse) Reset() { *m = ListProfilesResponse{} } -func (m *ListProfilesResponse) String() string { return proto.CompactTextString(m) } -func (*ListProfilesResponse) ProtoMessage() {} -func (*ListProfilesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +var xxx_messageInfo_ListProfilesResponse proto.InternalMessageInfo func (m *ListProfilesResponse) GetResults() []*Profile { if m != nil { @@ -302,19 +508,42 @@ func (m *ListProfilesResponse) GetResults() []*Profile { } type Group struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Notes string `protobuf:"bytes,3,opt,name=notes" json:"notes,omitempty"` - ProfileId *atlas_rpc.Identifier `protobuf:"bytes,4,opt,name=profile_id,json=profileId" json:"profile_id,omitempty"` - Contacts []*Contact `protobuf:"bytes,5,rep,name=contacts" json:"contacts,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Notes string `protobuf:"bytes,3,opt,name=notes,proto3" json:"notes,omitempty"` + ProfileId *resource.Identifier `protobuf:"bytes,4,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` + Contacts []*Contact `protobuf:"bytes,5,rep,name=contacts,proto3" json:"contacts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Group) Reset() { *m = Group{} } +func (m *Group) String() string { return proto.CompactTextString(m) } +func (*Group) ProtoMessage() {} +func (*Group) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{11} } -func (m *Group) Reset() { *m = Group{} } -func (m *Group) String() string { return proto.CompactTextString(m) } -func (*Group) ProtoMessage() {} -func (*Group) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (m *Group) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Group.Unmarshal(m, b) +} +func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Group.Marshal(b, m, deterministic) +} +func (m *Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_Group.Merge(m, src) +} +func (m *Group) XXX_Size() int { + return xxx_messageInfo_Group.Size(m) +} +func (m *Group) XXX_DiscardUnknown() { + xxx_messageInfo_Group.DiscardUnknown(m) +} -func (m *Group) GetId() *atlas_rpc.Identifier { +var xxx_messageInfo_Group proto.InternalMessageInfo + +func (m *Group) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -335,7 +564,7 @@ func (m *Group) GetNotes() string { return "" } -func (m *Group) GetProfileId() *atlas_rpc.Identifier { +func (m *Group) GetProfileId() *resource.Identifier { if m != nil { return m.ProfileId } @@ -350,13 +579,36 @@ func (m *Group) GetContacts() []*Contact { } type CreateGroupRequest struct { - Payload *Group `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` + Payload *Group `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateGroupRequest) Reset() { *m = CreateGroupRequest{} } +func (m *CreateGroupRequest) String() string { return proto.CompactTextString(m) } +func (*CreateGroupRequest) ProtoMessage() {} +func (*CreateGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{12} +} + +func (m *CreateGroupRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateGroupRequest.Unmarshal(m, b) +} +func (m *CreateGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateGroupRequest.Marshal(b, m, deterministic) +} +func (m *CreateGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateGroupRequest.Merge(m, src) +} +func (m *CreateGroupRequest) XXX_Size() int { + return xxx_messageInfo_CreateGroupRequest.Size(m) +} +func (m *CreateGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateGroupRequest.DiscardUnknown(m) } -func (m *CreateGroupRequest) Reset() { *m = CreateGroupRequest{} } -func (m *CreateGroupRequest) String() string { return proto.CompactTextString(m) } -func (*CreateGroupRequest) ProtoMessage() {} -func (*CreateGroupRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +var xxx_messageInfo_CreateGroupRequest proto.InternalMessageInfo func (m *CreateGroupRequest) GetPayload() *Group { if m != nil { @@ -366,13 +618,36 @@ func (m *CreateGroupRequest) GetPayload() *Group { } type CreateGroupResponse struct { - Result *Group `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Group `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CreateGroupResponse) Reset() { *m = CreateGroupResponse{} } -func (m *CreateGroupResponse) String() string { return proto.CompactTextString(m) } -func (*CreateGroupResponse) ProtoMessage() {} -func (*CreateGroupResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (m *CreateGroupResponse) Reset() { *m = CreateGroupResponse{} } +func (m *CreateGroupResponse) String() string { return proto.CompactTextString(m) } +func (*CreateGroupResponse) ProtoMessage() {} +func (*CreateGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{13} +} + +func (m *CreateGroupResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateGroupResponse.Unmarshal(m, b) +} +func (m *CreateGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateGroupResponse.Marshal(b, m, deterministic) +} +func (m *CreateGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateGroupResponse.Merge(m, src) +} +func (m *CreateGroupResponse) XXX_Size() int { + return xxx_messageInfo_CreateGroupResponse.Size(m) +} +func (m *CreateGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateGroupResponse proto.InternalMessageInfo func (m *CreateGroupResponse) GetResult() *Group { if m != nil { @@ -382,15 +657,38 @@ func (m *CreateGroupResponse) GetResult() *Group { } type ReadGroupRequest struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReadGroupRequest) Reset() { *m = ReadGroupRequest{} } -func (m *ReadGroupRequest) String() string { return proto.CompactTextString(m) } -func (*ReadGroupRequest) ProtoMessage() {} -func (*ReadGroupRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (m *ReadGroupRequest) Reset() { *m = ReadGroupRequest{} } +func (m *ReadGroupRequest) String() string { return proto.CompactTextString(m) } +func (*ReadGroupRequest) ProtoMessage() {} +func (*ReadGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{14} +} -func (m *ReadGroupRequest) GetId() *atlas_rpc.Identifier { +func (m *ReadGroupRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReadGroupRequest.Unmarshal(m, b) +} +func (m *ReadGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReadGroupRequest.Marshal(b, m, deterministic) +} +func (m *ReadGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReadGroupRequest.Merge(m, src) +} +func (m *ReadGroupRequest) XXX_Size() int { + return xxx_messageInfo_ReadGroupRequest.Size(m) +} +func (m *ReadGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReadGroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReadGroupRequest proto.InternalMessageInfo + +func (m *ReadGroupRequest) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -398,13 +696,36 @@ func (m *ReadGroupRequest) GetId() *atlas_rpc.Identifier { } type ReadGroupResponse struct { - Result *Group `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Group `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReadGroupResponse) Reset() { *m = ReadGroupResponse{} } -func (m *ReadGroupResponse) String() string { return proto.CompactTextString(m) } -func (*ReadGroupResponse) ProtoMessage() {} -func (*ReadGroupResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (m *ReadGroupResponse) Reset() { *m = ReadGroupResponse{} } +func (m *ReadGroupResponse) String() string { return proto.CompactTextString(m) } +func (*ReadGroupResponse) ProtoMessage() {} +func (*ReadGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{15} +} + +func (m *ReadGroupResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReadGroupResponse.Unmarshal(m, b) +} +func (m *ReadGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReadGroupResponse.Marshal(b, m, deterministic) +} +func (m *ReadGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReadGroupResponse.Merge(m, src) +} +func (m *ReadGroupResponse) XXX_Size() int { + return xxx_messageInfo_ReadGroupResponse.Size(m) +} +func (m *ReadGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReadGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReadGroupResponse proto.InternalMessageInfo func (m *ReadGroupResponse) GetResult() *Group { if m != nil { @@ -414,13 +735,36 @@ func (m *ReadGroupResponse) GetResult() *Group { } type UpdateGroupRequest struct { - Payload *Group `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` + Payload *Group `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateGroupRequest) Reset() { *m = UpdateGroupRequest{} } +func (m *UpdateGroupRequest) String() string { return proto.CompactTextString(m) } +func (*UpdateGroupRequest) ProtoMessage() {} +func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{16} +} + +func (m *UpdateGroupRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateGroupRequest.Unmarshal(m, b) +} +func (m *UpdateGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateGroupRequest.Marshal(b, m, deterministic) +} +func (m *UpdateGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateGroupRequest.Merge(m, src) +} +func (m *UpdateGroupRequest) XXX_Size() int { + return xxx_messageInfo_UpdateGroupRequest.Size(m) +} +func (m *UpdateGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateGroupRequest.DiscardUnknown(m) } -func (m *UpdateGroupRequest) Reset() { *m = UpdateGroupRequest{} } -func (m *UpdateGroupRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateGroupRequest) ProtoMessage() {} -func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +var xxx_messageInfo_UpdateGroupRequest proto.InternalMessageInfo func (m *UpdateGroupRequest) GetPayload() *Group { if m != nil { @@ -430,13 +774,36 @@ func (m *UpdateGroupRequest) GetPayload() *Group { } type UpdateGroupResponse struct { - Result *Group `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Group `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateGroupResponse) Reset() { *m = UpdateGroupResponse{} } +func (m *UpdateGroupResponse) String() string { return proto.CompactTextString(m) } +func (*UpdateGroupResponse) ProtoMessage() {} +func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{17} } -func (m *UpdateGroupResponse) Reset() { *m = UpdateGroupResponse{} } -func (m *UpdateGroupResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateGroupResponse) ProtoMessage() {} -func (*UpdateGroupResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (m *UpdateGroupResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateGroupResponse.Unmarshal(m, b) +} +func (m *UpdateGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateGroupResponse.Marshal(b, m, deterministic) +} +func (m *UpdateGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateGroupResponse.Merge(m, src) +} +func (m *UpdateGroupResponse) XXX_Size() int { + return xxx_messageInfo_UpdateGroupResponse.Size(m) +} +func (m *UpdateGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateGroupResponse proto.InternalMessageInfo func (m *UpdateGroupResponse) GetResult() *Group { if m != nil { @@ -446,15 +813,38 @@ func (m *UpdateGroupResponse) GetResult() *Group { } type DeleteGroupRequest struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteGroupRequest) Reset() { *m = DeleteGroupRequest{} } +func (m *DeleteGroupRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteGroupRequest) ProtoMessage() {} +func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{18} +} + +func (m *DeleteGroupRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteGroupRequest.Unmarshal(m, b) +} +func (m *DeleteGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteGroupRequest.Marshal(b, m, deterministic) +} +func (m *DeleteGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteGroupRequest.Merge(m, src) +} +func (m *DeleteGroupRequest) XXX_Size() int { + return xxx_messageInfo_DeleteGroupRequest.Size(m) +} +func (m *DeleteGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteGroupRequest.DiscardUnknown(m) } -func (m *DeleteGroupRequest) Reset() { *m = DeleteGroupRequest{} } -func (m *DeleteGroupRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteGroupRequest) ProtoMessage() {} -func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +var xxx_messageInfo_DeleteGroupRequest proto.InternalMessageInfo -func (m *DeleteGroupRequest) GetId() *atlas_rpc.Identifier { +func (m *DeleteGroupRequest) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -462,47 +852,93 @@ func (m *DeleteGroupRequest) GetId() *atlas_rpc.Identifier { } type DeleteGroupResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteGroupResponse) Reset() { *m = DeleteGroupResponse{} } -func (m *DeleteGroupResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteGroupResponse) ProtoMessage() {} -func (*DeleteGroupResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +func (m *DeleteGroupResponse) Reset() { *m = DeleteGroupResponse{} } +func (m *DeleteGroupResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteGroupResponse) ProtoMessage() {} +func (*DeleteGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{19} +} + +func (m *DeleteGroupResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteGroupResponse.Unmarshal(m, b) +} +func (m *DeleteGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteGroupResponse.Marshal(b, m, deterministic) +} +func (m *DeleteGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteGroupResponse.Merge(m, src) +} +func (m *DeleteGroupResponse) XXX_Size() int { + return xxx_messageInfo_DeleteGroupResponse.Size(m) +} +func (m *DeleteGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteGroupResponse proto.InternalMessageInfo type ListGroupRequest struct { - Filter *infoblox_api.Filtering `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` - OrderBy *infoblox_api.Sorting `protobuf:"bytes,2,opt,name=order_by,json=orderBy" json:"order_by,omitempty"` - Fields *infoblox_api.FieldSelection `protobuf:"bytes,3,opt,name=fields" json:"fields,omitempty"` - Paging *infoblox_api.Pagination `protobuf:"bytes,4,opt,name=paging" json:"paging,omitempty"` + Filter *query.Filtering `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + OrderBy *query.Sorting `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + Fields *query.FieldSelection `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields,omitempty"` + Paging *query.Pagination `protobuf:"bytes,4,opt,name=paging,proto3" json:"paging,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListGroupRequest) Reset() { *m = ListGroupRequest{} } +func (m *ListGroupRequest) String() string { return proto.CompactTextString(m) } +func (*ListGroupRequest) ProtoMessage() {} +func (*ListGroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{20} } -func (m *ListGroupRequest) Reset() { *m = ListGroupRequest{} } -func (m *ListGroupRequest) String() string { return proto.CompactTextString(m) } -func (*ListGroupRequest) ProtoMessage() {} -func (*ListGroupRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +func (m *ListGroupRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListGroupRequest.Unmarshal(m, b) +} +func (m *ListGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListGroupRequest.Marshal(b, m, deterministic) +} +func (m *ListGroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListGroupRequest.Merge(m, src) +} +func (m *ListGroupRequest) XXX_Size() int { + return xxx_messageInfo_ListGroupRequest.Size(m) +} +func (m *ListGroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListGroupRequest.DiscardUnknown(m) +} -func (m *ListGroupRequest) GetFilter() *infoblox_api.Filtering { +var xxx_messageInfo_ListGroupRequest proto.InternalMessageInfo + +func (m *ListGroupRequest) GetFilter() *query.Filtering { if m != nil { return m.Filter } return nil } -func (m *ListGroupRequest) GetOrderBy() *infoblox_api.Sorting { +func (m *ListGroupRequest) GetOrderBy() *query.Sorting { if m != nil { return m.OrderBy } return nil } -func (m *ListGroupRequest) GetFields() *infoblox_api.FieldSelection { +func (m *ListGroupRequest) GetFields() *query.FieldSelection { if m != nil { return m.Fields } return nil } -func (m *ListGroupRequest) GetPaging() *infoblox_api.Pagination { +func (m *ListGroupRequest) GetPaging() *query.Pagination { if m != nil { return m.Paging } @@ -510,13 +946,36 @@ func (m *ListGroupRequest) GetPaging() *infoblox_api.Pagination { } type ListGroupsResponse struct { - Results []*Group `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` + Results []*Group `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ListGroupsResponse) Reset() { *m = ListGroupsResponse{} } -func (m *ListGroupsResponse) String() string { return proto.CompactTextString(m) } -func (*ListGroupsResponse) ProtoMessage() {} -func (*ListGroupsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +func (m *ListGroupsResponse) Reset() { *m = ListGroupsResponse{} } +func (m *ListGroupsResponse) String() string { return proto.CompactTextString(m) } +func (*ListGroupsResponse) ProtoMessage() {} +func (*ListGroupsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{21} +} + +func (m *ListGroupsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListGroupsResponse.Unmarshal(m, b) +} +func (m *ListGroupsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListGroupsResponse.Marshal(b, m, deterministic) +} +func (m *ListGroupsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListGroupsResponse.Merge(m, src) +} +func (m *ListGroupsResponse) XXX_Size() int { + return xxx_messageInfo_ListGroupsResponse.Size(m) +} +func (m *ListGroupsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListGroupsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListGroupsResponse proto.InternalMessageInfo func (m *ListGroupsResponse) GetResults() []*Group { if m != nil { @@ -526,27 +985,50 @@ func (m *ListGroupsResponse) GetResults() []*Group { } type Contact struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName" json:"first_name,omitempty"` - MiddleName string `protobuf:"bytes,3,opt,name=middle_name,json=middleName" json:"middle_name,omitempty"` - LastName string `protobuf:"bytes,4,opt,name=last_name,json=lastName" json:"last_name,omitempty"` - PrimaryEmail string `protobuf:"bytes,5,opt,name=primary_email,json=primaryEmail" json:"primary_email,omitempty"` - Notes string `protobuf:"bytes,6,opt,name=notes" json:"notes,omitempty"` - Emails []*Email `protobuf:"bytes,7,rep,name=emails" json:"emails,omitempty"` - HomeAddress *Address `protobuf:"bytes,8,opt,name=home_address,json=homeAddress" json:"home_address,omitempty"` - WorkAddress *Address `protobuf:"bytes,9,opt,name=work_address,json=workAddress" json:"work_address,omitempty"` - ProfileId *atlas_rpc.Identifier `protobuf:"bytes,10,opt,name=profile_id,json=profileId" json:"profile_id,omitempty"` - Groups []*Group `protobuf:"bytes,11,rep,name=groups" json:"groups,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` + MiddleName string `protobuf:"bytes,3,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` + LastName string `protobuf:"bytes,4,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` + PrimaryEmail string `protobuf:"bytes,5,opt,name=primary_email,json=primaryEmail,proto3" json:"primary_email,omitempty"` + Notes string `protobuf:"bytes,6,opt,name=notes,proto3" json:"notes,omitempty"` + Emails []*Email `protobuf:"bytes,7,rep,name=emails,proto3" json:"emails,omitempty"` + HomeAddress *Address `protobuf:"bytes,8,opt,name=home_address,json=homeAddress,proto3" json:"home_address,omitempty"` + WorkAddress *Address `protobuf:"bytes,9,opt,name=work_address,json=workAddress,proto3" json:"work_address,omitempty"` + ProfileId *resource.Identifier `protobuf:"bytes,10,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` + Groups []*Group `protobuf:"bytes,11,rep,name=groups,proto3" json:"groups,omitempty"` // nicknames is arbitrary json, but should be used for a list of strings - Nicknames *gorm_types.JSONValue `protobuf:"bytes,12,opt,name=nicknames" json:"nicknames,omitempty"` + Nicknames *types.JSONValue `protobuf:"bytes,12,opt,name=nicknames,proto3" json:"nicknames,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Contact) Reset() { *m = Contact{} } -func (m *Contact) String() string { return proto.CompactTextString(m) } -func (*Contact) ProtoMessage() {} -func (*Contact) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (m *Contact) Reset() { *m = Contact{} } +func (m *Contact) String() string { return proto.CompactTextString(m) } +func (*Contact) ProtoMessage() {} +func (*Contact) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{22} +} -func (m *Contact) GetId() *atlas_rpc.Identifier { +func (m *Contact) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Contact.Unmarshal(m, b) +} +func (m *Contact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Contact.Marshal(b, m, deterministic) +} +func (m *Contact) XXX_Merge(src proto.Message) { + xxx_messageInfo_Contact.Merge(m, src) +} +func (m *Contact) XXX_Size() int { + return xxx_messageInfo_Contact.Size(m) +} +func (m *Contact) XXX_DiscardUnknown() { + xxx_messageInfo_Contact.DiscardUnknown(m) +} + +var xxx_messageInfo_Contact proto.InternalMessageInfo + +func (m *Contact) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -609,7 +1091,7 @@ func (m *Contact) GetWorkAddress() *Address { return nil } -func (m *Contact) GetProfileId() *atlas_rpc.Identifier { +func (m *Contact) GetProfileId() *resource.Identifier { if m != nil { return m.ProfileId } @@ -623,7 +1105,7 @@ func (m *Contact) GetGroups() []*Group { return nil } -func (m *Contact) GetNicknames() *gorm_types.JSONValue { +func (m *Contact) GetNicknames() *types.JSONValue { if m != nil { return m.Nicknames } @@ -631,14 +1113,37 @@ func (m *Contact) GetNicknames() *gorm_types.JSONValue { } type Email struct { - Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Email) Reset() { *m = Email{} } -func (m *Email) String() string { return proto.CompactTextString(m) } -func (*Email) ProtoMessage() {} -func (*Email) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (m *Email) Reset() { *m = Email{} } +func (m *Email) String() string { return proto.CompactTextString(m) } +func (*Email) ProtoMessage() {} +func (*Email) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{23} +} + +func (m *Email) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Email.Unmarshal(m, b) +} +func (m *Email) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Email.Marshal(b, m, deterministic) +} +func (m *Email) XXX_Merge(src proto.Message) { + xxx_messageInfo_Email.Merge(m, src) +} +func (m *Email) XXX_Size() int { + return xxx_messageInfo_Email.Size(m) +} +func (m *Email) XXX_DiscardUnknown() { + xxx_messageInfo_Email.DiscardUnknown(m) +} + +var xxx_messageInfo_Email proto.InternalMessageInfo func (m *Email) GetId() uint64 { if m != nil { @@ -655,17 +1160,40 @@ func (m *Email) GetAddress() string { } type Address struct { - Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` - City string `protobuf:"bytes,2,opt,name=city" json:"city,omitempty"` - State string `protobuf:"bytes,3,opt,name=state" json:"state,omitempty"` - Zip string `protobuf:"bytes,4,opt,name=zip" json:"zip,omitempty"` - Country string `protobuf:"bytes,5,opt,name=country" json:"country,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + Zip string `protobuf:"bytes,4,opt,name=zip,proto3" json:"zip,omitempty"` + Country string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Address) Reset() { *m = Address{} } +func (m *Address) String() string { return proto.CompactTextString(m) } +func (*Address) ProtoMessage() {} +func (*Address) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{24} +} + +func (m *Address) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Address.Unmarshal(m, b) +} +func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Address.Marshal(b, m, deterministic) +} +func (m *Address) XXX_Merge(src proto.Message) { + xxx_messageInfo_Address.Merge(m, src) +} +func (m *Address) XXX_Size() int { + return xxx_messageInfo_Address.Size(m) +} +func (m *Address) XXX_DiscardUnknown() { + xxx_messageInfo_Address.DiscardUnknown(m) } -func (m *Address) Reset() { *m = Address{} } -func (m *Address) String() string { return proto.CompactTextString(m) } -func (*Address) ProtoMessage() {} -func (*Address) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } +var xxx_messageInfo_Address proto.InternalMessageInfo func (m *Address) GetAddress() string { if m != nil { @@ -703,13 +1231,36 @@ func (m *Address) GetCountry() string { } type CreateContactRequest struct { - Payload *Contact `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` + Payload *Contact `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CreateContactRequest) Reset() { *m = CreateContactRequest{} } -func (m *CreateContactRequest) String() string { return proto.CompactTextString(m) } -func (*CreateContactRequest) ProtoMessage() {} -func (*CreateContactRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (m *CreateContactRequest) Reset() { *m = CreateContactRequest{} } +func (m *CreateContactRequest) String() string { return proto.CompactTextString(m) } +func (*CreateContactRequest) ProtoMessage() {} +func (*CreateContactRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{25} +} + +func (m *CreateContactRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateContactRequest.Unmarshal(m, b) +} +func (m *CreateContactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateContactRequest.Marshal(b, m, deterministic) +} +func (m *CreateContactRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateContactRequest.Merge(m, src) +} +func (m *CreateContactRequest) XXX_Size() int { + return xxx_messageInfo_CreateContactRequest.Size(m) +} +func (m *CreateContactRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateContactRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateContactRequest proto.InternalMessageInfo func (m *CreateContactRequest) GetPayload() *Contact { if m != nil { @@ -719,13 +1270,36 @@ func (m *CreateContactRequest) GetPayload() *Contact { } type CreateContactResponse struct { - Result *Contact `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Contact `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateContactResponse) Reset() { *m = CreateContactResponse{} } +func (m *CreateContactResponse) String() string { return proto.CompactTextString(m) } +func (*CreateContactResponse) ProtoMessage() {} +func (*CreateContactResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{26} } -func (m *CreateContactResponse) Reset() { *m = CreateContactResponse{} } -func (m *CreateContactResponse) String() string { return proto.CompactTextString(m) } -func (*CreateContactResponse) ProtoMessage() {} -func (*CreateContactResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } +func (m *CreateContactResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateContactResponse.Unmarshal(m, b) +} +func (m *CreateContactResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateContactResponse.Marshal(b, m, deterministic) +} +func (m *CreateContactResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateContactResponse.Merge(m, src) +} +func (m *CreateContactResponse) XXX_Size() int { + return xxx_messageInfo_CreateContactResponse.Size(m) +} +func (m *CreateContactResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateContactResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateContactResponse proto.InternalMessageInfo func (m *CreateContactResponse) GetResult() *Contact { if m != nil { @@ -735,15 +1309,38 @@ func (m *CreateContactResponse) GetResult() *Contact { } type ReadContactRequest struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReadContactRequest) Reset() { *m = ReadContactRequest{} } -func (m *ReadContactRequest) String() string { return proto.CompactTextString(m) } -func (*ReadContactRequest) ProtoMessage() {} -func (*ReadContactRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } +func (m *ReadContactRequest) Reset() { *m = ReadContactRequest{} } +func (m *ReadContactRequest) String() string { return proto.CompactTextString(m) } +func (*ReadContactRequest) ProtoMessage() {} +func (*ReadContactRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{27} +} -func (m *ReadContactRequest) GetId() *atlas_rpc.Identifier { +func (m *ReadContactRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReadContactRequest.Unmarshal(m, b) +} +func (m *ReadContactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReadContactRequest.Marshal(b, m, deterministic) +} +func (m *ReadContactRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReadContactRequest.Merge(m, src) +} +func (m *ReadContactRequest) XXX_Size() int { + return xxx_messageInfo_ReadContactRequest.Size(m) +} +func (m *ReadContactRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReadContactRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReadContactRequest proto.InternalMessageInfo + +func (m *ReadContactRequest) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -751,13 +1348,36 @@ func (m *ReadContactRequest) GetId() *atlas_rpc.Identifier { } type ReadContactResponse struct { - Result *Contact `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Contact `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReadContactResponse) Reset() { *m = ReadContactResponse{} } -func (m *ReadContactResponse) String() string { return proto.CompactTextString(m) } -func (*ReadContactResponse) ProtoMessage() {} -func (*ReadContactResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (m *ReadContactResponse) Reset() { *m = ReadContactResponse{} } +func (m *ReadContactResponse) String() string { return proto.CompactTextString(m) } +func (*ReadContactResponse) ProtoMessage() {} +func (*ReadContactResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{28} +} + +func (m *ReadContactResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReadContactResponse.Unmarshal(m, b) +} +func (m *ReadContactResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReadContactResponse.Marshal(b, m, deterministic) +} +func (m *ReadContactResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReadContactResponse.Merge(m, src) +} +func (m *ReadContactResponse) XXX_Size() int { + return xxx_messageInfo_ReadContactResponse.Size(m) +} +func (m *ReadContactResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReadContactResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReadContactResponse proto.InternalMessageInfo func (m *ReadContactResponse) GetResult() *Contact { if m != nil { @@ -767,14 +1387,37 @@ func (m *ReadContactResponse) GetResult() *Contact { } type UpdateContactRequest struct { - Payload *Contact `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` - Fields *google_protobuf.FieldMask `protobuf:"bytes,2,opt,name=fields" json:"fields,omitempty"` + Payload *Contact `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + Fields *field_mask.FieldMask `protobuf:"bytes,2,opt,name=fields,proto3" json:"fields,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateContactRequest) Reset() { *m = UpdateContactRequest{} } +func (m *UpdateContactRequest) String() string { return proto.CompactTextString(m) } +func (*UpdateContactRequest) ProtoMessage() {} +func (*UpdateContactRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{29} } -func (m *UpdateContactRequest) Reset() { *m = UpdateContactRequest{} } -func (m *UpdateContactRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateContactRequest) ProtoMessage() {} -func (*UpdateContactRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (m *UpdateContactRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateContactRequest.Unmarshal(m, b) +} +func (m *UpdateContactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateContactRequest.Marshal(b, m, deterministic) +} +func (m *UpdateContactRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateContactRequest.Merge(m, src) +} +func (m *UpdateContactRequest) XXX_Size() int { + return xxx_messageInfo_UpdateContactRequest.Size(m) +} +func (m *UpdateContactRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateContactRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateContactRequest proto.InternalMessageInfo func (m *UpdateContactRequest) GetPayload() *Contact { if m != nil { @@ -783,7 +1426,7 @@ func (m *UpdateContactRequest) GetPayload() *Contact { return nil } -func (m *UpdateContactRequest) GetFields() *google_protobuf.FieldMask { +func (m *UpdateContactRequest) GetFields() *field_mask.FieldMask { if m != nil { return m.Fields } @@ -791,13 +1434,36 @@ func (m *UpdateContactRequest) GetFields() *google_protobuf.FieldMask { } type UpdateContactResponse struct { - Result *Contact `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + Result *Contact `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateContactResponse) Reset() { *m = UpdateContactResponse{} } +func (m *UpdateContactResponse) String() string { return proto.CompactTextString(m) } +func (*UpdateContactResponse) ProtoMessage() {} +func (*UpdateContactResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{30} +} + +func (m *UpdateContactResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateContactResponse.Unmarshal(m, b) +} +func (m *UpdateContactResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateContactResponse.Marshal(b, m, deterministic) +} +func (m *UpdateContactResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateContactResponse.Merge(m, src) +} +func (m *UpdateContactResponse) XXX_Size() int { + return xxx_messageInfo_UpdateContactResponse.Size(m) +} +func (m *UpdateContactResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateContactResponse.DiscardUnknown(m) } -func (m *UpdateContactResponse) Reset() { *m = UpdateContactResponse{} } -func (m *UpdateContactResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateContactResponse) ProtoMessage() {} -func (*UpdateContactResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +var xxx_messageInfo_UpdateContactResponse proto.InternalMessageInfo func (m *UpdateContactResponse) GetResult() *Contact { if m != nil { @@ -807,15 +1473,38 @@ func (m *UpdateContactResponse) GetResult() *Contact { } type DeleteContactRequest struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteContactRequest) Reset() { *m = DeleteContactRequest{} } -func (m *DeleteContactRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteContactRequest) ProtoMessage() {} -func (*DeleteContactRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } +func (m *DeleteContactRequest) Reset() { *m = DeleteContactRequest{} } +func (m *DeleteContactRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteContactRequest) ProtoMessage() {} +func (*DeleteContactRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{31} +} + +func (m *DeleteContactRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteContactRequest.Unmarshal(m, b) +} +func (m *DeleteContactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteContactRequest.Marshal(b, m, deterministic) +} +func (m *DeleteContactRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteContactRequest.Merge(m, src) +} +func (m *DeleteContactRequest) XXX_Size() int { + return xxx_messageInfo_DeleteContactRequest.Size(m) +} +func (m *DeleteContactRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteContactRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteContactRequest proto.InternalMessageInfo -func (m *DeleteContactRequest) GetId() *atlas_rpc.Identifier { +func (m *DeleteContactRequest) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -823,21 +1512,67 @@ func (m *DeleteContactRequest) GetId() *atlas_rpc.Identifier { } type DeleteContactResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteContactResponse) Reset() { *m = DeleteContactResponse{} } -func (m *DeleteContactResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteContactResponse) ProtoMessage() {} -func (*DeleteContactResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } +func (m *DeleteContactResponse) Reset() { *m = DeleteContactResponse{} } +func (m *DeleteContactResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteContactResponse) ProtoMessage() {} +func (*DeleteContactResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{32} +} + +func (m *DeleteContactResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteContactResponse.Unmarshal(m, b) +} +func (m *DeleteContactResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteContactResponse.Marshal(b, m, deterministic) +} +func (m *DeleteContactResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteContactResponse.Merge(m, src) +} +func (m *DeleteContactResponse) XXX_Size() int { + return xxx_messageInfo_DeleteContactResponse.Size(m) +} +func (m *DeleteContactResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteContactResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteContactResponse proto.InternalMessageInfo type ListContactsResponse struct { - Results []*Contact `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` + Results []*Contact `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListContactsResponse) Reset() { *m = ListContactsResponse{} } +func (m *ListContactsResponse) String() string { return proto.CompactTextString(m) } +func (*ListContactsResponse) ProtoMessage() {} +func (*ListContactsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{33} +} + +func (m *ListContactsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListContactsResponse.Unmarshal(m, b) +} +func (m *ListContactsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListContactsResponse.Marshal(b, m, deterministic) +} +func (m *ListContactsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListContactsResponse.Merge(m, src) +} +func (m *ListContactsResponse) XXX_Size() int { + return xxx_messageInfo_ListContactsResponse.Size(m) +} +func (m *ListContactsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListContactsResponse.DiscardUnknown(m) } -func (m *ListContactsResponse) Reset() { *m = ListContactsResponse{} } -func (m *ListContactsResponse) String() string { return proto.CompactTextString(m) } -func (*ListContactsResponse) ProtoMessage() {} -func (*ListContactsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } +var xxx_messageInfo_ListContactsResponse proto.InternalMessageInfo func (m *ListContactsResponse) GetResults() []*Contact { if m != nil { @@ -847,14 +1582,37 @@ func (m *ListContactsResponse) GetResults() []*Contact { } type SMSRequest struct { - Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SMSRequest) Reset() { *m = SMSRequest{} } -func (m *SMSRequest) String() string { return proto.CompactTextString(m) } -func (*SMSRequest) ProtoMessage() {} -func (*SMSRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } +func (m *SMSRequest) Reset() { *m = SMSRequest{} } +func (m *SMSRequest) String() string { return proto.CompactTextString(m) } +func (*SMSRequest) ProtoMessage() {} +func (*SMSRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{34} +} + +func (m *SMSRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SMSRequest.Unmarshal(m, b) +} +func (m *SMSRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SMSRequest.Marshal(b, m, deterministic) +} +func (m *SMSRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SMSRequest.Merge(m, src) +} +func (m *SMSRequest) XXX_Size() int { + return xxx_messageInfo_SMSRequest.Size(m) +} +func (m *SMSRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SMSRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SMSRequest proto.InternalMessageInfo func (m *SMSRequest) GetId() uint64 { if m != nil { @@ -871,47 +1629,93 @@ func (m *SMSRequest) GetMessage() string { } type SMSResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SMSResponse) Reset() { *m = SMSResponse{} } +func (m *SMSResponse) String() string { return proto.CompactTextString(m) } +func (*SMSResponse) ProtoMessage() {} +func (*SMSResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{35} +} + +func (m *SMSResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SMSResponse.Unmarshal(m, b) +} +func (m *SMSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SMSResponse.Marshal(b, m, deterministic) +} +func (m *SMSResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SMSResponse.Merge(m, src) +} +func (m *SMSResponse) XXX_Size() int { + return xxx_messageInfo_SMSResponse.Size(m) +} +func (m *SMSResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SMSResponse.DiscardUnknown(m) } -func (m *SMSResponse) Reset() { *m = SMSResponse{} } -func (m *SMSResponse) String() string { return proto.CompactTextString(m) } -func (*SMSResponse) ProtoMessage() {} -func (*SMSResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } +var xxx_messageInfo_SMSResponse proto.InternalMessageInfo type ListContactRequest struct { - Filter *infoblox_api.Filtering `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` - OrderBy *infoblox_api.Sorting `protobuf:"bytes,2,opt,name=order_by,json=orderBy" json:"order_by,omitempty"` - Fields *infoblox_api.FieldSelection `protobuf:"bytes,3,opt,name=fields" json:"fields,omitempty"` - Paging *infoblox_api.Pagination `protobuf:"bytes,4,opt,name=paging" json:"paging,omitempty"` + Filter *query.Filtering `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + OrderBy *query.Sorting `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + Fields *query.FieldSelection `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields,omitempty"` + Paging *query.Pagination `protobuf:"bytes,4,opt,name=paging,proto3" json:"paging,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListContactRequest) Reset() { *m = ListContactRequest{} } +func (m *ListContactRequest) String() string { return proto.CompactTextString(m) } +func (*ListContactRequest) ProtoMessage() {} +func (*ListContactRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_8bd68f74ee07226d, []int{36} +} + +func (m *ListContactRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListContactRequest.Unmarshal(m, b) +} +func (m *ListContactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListContactRequest.Marshal(b, m, deterministic) +} +func (m *ListContactRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListContactRequest.Merge(m, src) +} +func (m *ListContactRequest) XXX_Size() int { + return xxx_messageInfo_ListContactRequest.Size(m) +} +func (m *ListContactRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListContactRequest.DiscardUnknown(m) } -func (m *ListContactRequest) Reset() { *m = ListContactRequest{} } -func (m *ListContactRequest) String() string { return proto.CompactTextString(m) } -func (*ListContactRequest) ProtoMessage() {} -func (*ListContactRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +var xxx_messageInfo_ListContactRequest proto.InternalMessageInfo -func (m *ListContactRequest) GetFilter() *infoblox_api.Filtering { +func (m *ListContactRequest) GetFilter() *query.Filtering { if m != nil { return m.Filter } return nil } -func (m *ListContactRequest) GetOrderBy() *infoblox_api.Sorting { +func (m *ListContactRequest) GetOrderBy() *query.Sorting { if m != nil { return m.OrderBy } return nil } -func (m *ListContactRequest) GetFields() *infoblox_api.FieldSelection { +func (m *ListContactRequest) GetFields() *query.FieldSelection { if m != nil { return m.Fields } return nil } -func (m *ListContactRequest) GetPaging() *infoblox_api.Pagination { +func (m *ListContactRequest) GetPaging() *query.Pagination { if m != nil { return m.Paging } @@ -919,43 +1723,161 @@ func (m *ListContactRequest) GetPaging() *infoblox_api.Pagination { } func init() { - proto.RegisterType((*Profile)(nil), "api.contacts.Profile") - proto.RegisterType((*CreateProfileRequest)(nil), "api.contacts.CreateProfileRequest") - proto.RegisterType((*CreateProfileResponse)(nil), "api.contacts.CreateProfileResponse") - proto.RegisterType((*ReadProfileRequest)(nil), "api.contacts.ReadProfileRequest") - proto.RegisterType((*ReadProfileResponse)(nil), "api.contacts.ReadProfileResponse") - proto.RegisterType((*UpdateProfileRequest)(nil), "api.contacts.UpdateProfileRequest") - proto.RegisterType((*UpdateProfileResponse)(nil), "api.contacts.UpdateProfileResponse") - proto.RegisterType((*DeleteProfileRequest)(nil), "api.contacts.DeleteProfileRequest") - proto.RegisterType((*DeleteProfileResponse)(nil), "api.contacts.DeleteProfileResponse") - proto.RegisterType((*ListProfileRequest)(nil), "api.contacts.ListProfileRequest") - proto.RegisterType((*ListProfilesResponse)(nil), "api.contacts.ListProfilesResponse") - proto.RegisterType((*Group)(nil), "api.contacts.Group") - proto.RegisterType((*CreateGroupRequest)(nil), "api.contacts.CreateGroupRequest") - proto.RegisterType((*CreateGroupResponse)(nil), "api.contacts.CreateGroupResponse") - proto.RegisterType((*ReadGroupRequest)(nil), "api.contacts.ReadGroupRequest") - proto.RegisterType((*ReadGroupResponse)(nil), "api.contacts.ReadGroupResponse") - proto.RegisterType((*UpdateGroupRequest)(nil), "api.contacts.UpdateGroupRequest") - proto.RegisterType((*UpdateGroupResponse)(nil), "api.contacts.UpdateGroupResponse") - proto.RegisterType((*DeleteGroupRequest)(nil), "api.contacts.DeleteGroupRequest") - proto.RegisterType((*DeleteGroupResponse)(nil), "api.contacts.DeleteGroupResponse") - proto.RegisterType((*ListGroupRequest)(nil), "api.contacts.ListGroupRequest") - proto.RegisterType((*ListGroupsResponse)(nil), "api.contacts.ListGroupsResponse") - proto.RegisterType((*Contact)(nil), "api.contacts.Contact") - proto.RegisterType((*Email)(nil), "api.contacts.Email") - proto.RegisterType((*Address)(nil), "api.contacts.Address") - proto.RegisterType((*CreateContactRequest)(nil), "api.contacts.CreateContactRequest") - proto.RegisterType((*CreateContactResponse)(nil), "api.contacts.CreateContactResponse") - proto.RegisterType((*ReadContactRequest)(nil), "api.contacts.ReadContactRequest") - proto.RegisterType((*ReadContactResponse)(nil), "api.contacts.ReadContactResponse") - proto.RegisterType((*UpdateContactRequest)(nil), "api.contacts.UpdateContactRequest") - proto.RegisterType((*UpdateContactResponse)(nil), "api.contacts.UpdateContactResponse") - proto.RegisterType((*DeleteContactRequest)(nil), "api.contacts.DeleteContactRequest") - proto.RegisterType((*DeleteContactResponse)(nil), "api.contacts.DeleteContactResponse") - proto.RegisterType((*ListContactsResponse)(nil), "api.contacts.ListContactsResponse") - proto.RegisterType((*SMSRequest)(nil), "api.contacts.SMSRequest") - proto.RegisterType((*SMSResponse)(nil), "api.contacts.SMSResponse") - proto.RegisterType((*ListContactRequest)(nil), "api.contacts.ListContactRequest") + proto.RegisterType((*Profile)(nil), "api.examples.contacts.v1.Profile") + proto.RegisterType((*CreateProfileRequest)(nil), "api.examples.contacts.v1.CreateProfileRequest") + proto.RegisterType((*CreateProfileResponse)(nil), "api.examples.contacts.v1.CreateProfileResponse") + proto.RegisterType((*ReadProfileRequest)(nil), "api.examples.contacts.v1.ReadProfileRequest") + proto.RegisterType((*ReadProfileResponse)(nil), "api.examples.contacts.v1.ReadProfileResponse") + proto.RegisterType((*UpdateProfileRequest)(nil), "api.examples.contacts.v1.UpdateProfileRequest") + proto.RegisterType((*UpdateProfileResponse)(nil), "api.examples.contacts.v1.UpdateProfileResponse") + proto.RegisterType((*DeleteProfileRequest)(nil), "api.examples.contacts.v1.DeleteProfileRequest") + proto.RegisterType((*DeleteProfileResponse)(nil), "api.examples.contacts.v1.DeleteProfileResponse") + proto.RegisterType((*ListProfileRequest)(nil), "api.examples.contacts.v1.ListProfileRequest") + proto.RegisterType((*ListProfilesResponse)(nil), "api.examples.contacts.v1.ListProfilesResponse") + proto.RegisterType((*Group)(nil), "api.examples.contacts.v1.Group") + proto.RegisterType((*CreateGroupRequest)(nil), "api.examples.contacts.v1.CreateGroupRequest") + proto.RegisterType((*CreateGroupResponse)(nil), "api.examples.contacts.v1.CreateGroupResponse") + proto.RegisterType((*ReadGroupRequest)(nil), "api.examples.contacts.v1.ReadGroupRequest") + proto.RegisterType((*ReadGroupResponse)(nil), "api.examples.contacts.v1.ReadGroupResponse") + proto.RegisterType((*UpdateGroupRequest)(nil), "api.examples.contacts.v1.UpdateGroupRequest") + proto.RegisterType((*UpdateGroupResponse)(nil), "api.examples.contacts.v1.UpdateGroupResponse") + proto.RegisterType((*DeleteGroupRequest)(nil), "api.examples.contacts.v1.DeleteGroupRequest") + proto.RegisterType((*DeleteGroupResponse)(nil), "api.examples.contacts.v1.DeleteGroupResponse") + proto.RegisterType((*ListGroupRequest)(nil), "api.examples.contacts.v1.ListGroupRequest") + proto.RegisterType((*ListGroupsResponse)(nil), "api.examples.contacts.v1.ListGroupsResponse") + proto.RegisterType((*Contact)(nil), "api.examples.contacts.v1.Contact") + proto.RegisterType((*Email)(nil), "api.examples.contacts.v1.Email") + proto.RegisterType((*Address)(nil), "api.examples.contacts.v1.Address") + proto.RegisterType((*CreateContactRequest)(nil), "api.examples.contacts.v1.CreateContactRequest") + proto.RegisterType((*CreateContactResponse)(nil), "api.examples.contacts.v1.CreateContactResponse") + proto.RegisterType((*ReadContactRequest)(nil), "api.examples.contacts.v1.ReadContactRequest") + proto.RegisterType((*ReadContactResponse)(nil), "api.examples.contacts.v1.ReadContactResponse") + proto.RegisterType((*UpdateContactRequest)(nil), "api.examples.contacts.v1.UpdateContactRequest") + proto.RegisterType((*UpdateContactResponse)(nil), "api.examples.contacts.v1.UpdateContactResponse") + proto.RegisterType((*DeleteContactRequest)(nil), "api.examples.contacts.v1.DeleteContactRequest") + proto.RegisterType((*DeleteContactResponse)(nil), "api.examples.contacts.v1.DeleteContactResponse") + proto.RegisterType((*ListContactsResponse)(nil), "api.examples.contacts.v1.ListContactsResponse") + proto.RegisterType((*SMSRequest)(nil), "api.examples.contacts.v1.SMSRequest") + proto.RegisterType((*SMSResponse)(nil), "api.examples.contacts.v1.SMSResponse") + proto.RegisterType((*ListContactRequest)(nil), "api.examples.contacts.v1.ListContactRequest") +} + +func init() { + proto.RegisterFile("github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto", fileDescriptor_8bd68f74ee07226d) +} + +var fileDescriptor_8bd68f74ee07226d = []byte{ + // 1759 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcd, 0x8f, 0xdb, 0xc6, + 0x15, 0x2f, 0xb5, 0xfa, 0x7c, 0x72, 0x9c, 0xf5, 0x78, 0x5d, 0x53, 0xaa, 0x8d, 0xa8, 0x44, 0x03, + 0x18, 0xeb, 0x15, 0x69, 0xcb, 0x46, 0x0d, 0xef, 0x22, 0x40, 0x22, 0xc7, 0x2d, 0x62, 0xc4, 0x5e, + 0x43, 0x42, 0x7b, 0x28, 0x50, 0xa8, 0x23, 0x72, 0x24, 0x33, 0x4b, 0x71, 0x68, 0x0e, 0x15, 0x47, + 0x2d, 0x82, 0xa2, 0x2d, 0x8a, 0xdc, 0xd3, 0x4b, 0xd0, 0x43, 0xff, 0x8e, 0xae, 0x4e, 0xfd, 0x1b, + 0xd2, 0x63, 0x51, 0xf4, 0xd2, 0x4b, 0x2f, 0x05, 0x7a, 0xe9, 0xb9, 0xe0, 0x7c, 0x50, 0x12, 0xf5, + 0xc5, 0xfd, 0x40, 0x0f, 0xbe, 0x08, 0xfc, 0x78, 0xef, 0xcd, 0x6f, 0xde, 0xfc, 0xde, 0x6f, 0xde, + 0x50, 0xf0, 0xe1, 0xd0, 0x8d, 0x5e, 0x8d, 0xfb, 0xa6, 0x4d, 0x47, 0x96, 0xeb, 0x0f, 0x68, 0xdf, + 0xa3, 0x5f, 0xd0, 0x80, 0xf8, 0x16, 0x8e, 0x3c, 0xcc, 0x9a, 0x36, 0xf5, 0x23, 0x6c, 0x47, 0xac, + 0x89, 0x83, 0xc0, 0x0a, 0x4e, 0x86, 0x56, 0xd0, 0xb7, 0xd4, 0x33, 0x33, 0x08, 0x69, 0x44, 0x91, + 0x8e, 0x03, 0xd7, 0x24, 0x5f, 0xe0, 0x51, 0xe0, 0x11, 0x66, 0x26, 0x2f, 0x3f, 0xbf, 0x5f, 0x6f, + 0x0c, 0x29, 0x1d, 0x7a, 0xc4, 0xe2, 0x76, 0xfd, 0xf1, 0xc0, 0x1a, 0xb8, 0xc4, 0x73, 0x7a, 0x23, + 0xcc, 0x4e, 0x84, 0x6f, 0xfd, 0x96, 0xb4, 0xc0, 0x81, 0x6b, 0x61, 0xdf, 0xa7, 0x11, 0x8e, 0x5c, + 0xea, 0xcb, 0xc8, 0xf5, 0xa3, 0x39, 0x6c, 0xde, 0x64, 0x10, 0x89, 0x40, 0x76, 0x73, 0x48, 0xfc, + 0xe6, 0xe7, 0xd8, 0x73, 0x1d, 0x1c, 0x11, 0x6b, 0xe9, 0x42, 0x3a, 0x1f, 0xcc, 0x19, 0xb3, 0x37, + 0x78, 0x38, 0x24, 0xa1, 0x45, 0x03, 0x1e, 0x7e, 0xc5, 0x50, 0x87, 0xeb, 0xd2, 0x30, 0x17, 0x65, + 0x48, 0xc3, 0x51, 0x12, 0x22, 0xbe, 0x91, 0xbe, 0x8f, 0xb3, 0xfa, 0x46, 0x93, 0x80, 0x30, 0xf1, + 0x2b, 0x5d, 0x9f, 0x6d, 0xce, 0x3e, 0x0e, 0x82, 0x66, 0x44, 0xa9, 0x77, 0xe2, 0x46, 0xd6, 0xeb, + 0x31, 0x09, 0x27, 0x96, 0x4d, 0x3d, 0x8f, 0xd8, 0x31, 0x84, 0x1e, 0x0d, 0x48, 0x88, 0x23, 0x1a, + 0xaa, 0x58, 0x4f, 0xb3, 0xc7, 0x0a, 0x03, 0xdb, 0x0a, 0x09, 0xa3, 0xe3, 0xd0, 0x26, 0xc9, 0x85, + 0x08, 0x63, 0xfc, 0x5b, 0x83, 0xd2, 0xcb, 0x90, 0x0e, 0x5c, 0x8f, 0xa0, 0x47, 0x90, 0x73, 0x1d, + 0x5d, 0x6b, 0x68, 0x77, 0xaa, 0xad, 0x1b, 0x26, 0x8f, 0x63, 0x86, 0x81, 0x6d, 0x7e, 0xe2, 0x10, + 0x3f, 0x72, 0x07, 0x2e, 0x09, 0xdb, 0xbb, 0xd3, 0xd3, 0xda, 0x15, 0x00, 0x54, 0x64, 0x24, 0x74, + 0xb1, 0x77, 0x47, 0xeb, 0xe4, 0x5c, 0x07, 0x21, 0xc8, 0xfb, 0x78, 0x44, 0xf4, 0x5c, 0x43, 0xbb, + 0x53, 0xe9, 0xf0, 0x6b, 0xb4, 0x07, 0x05, 0x9f, 0x46, 0x84, 0xe9, 0x3b, 0xfc, 0xa1, 0xb8, 0x41, + 0x1f, 0x40, 0x59, 0x51, 0x46, 0xcf, 0x37, 0x76, 0xee, 0x54, 0x5b, 0xdf, 0x37, 0xd7, 0x11, 0xca, + 0x7c, 0x22, 0xae, 0x3b, 0x89, 0x0b, 0x7a, 0x04, 0xc5, 0x61, 0x48, 0xc7, 0x01, 0xd3, 0x0b, 0xdc, + 0xf9, 0xbd, 0xf5, 0xce, 0x3f, 0x8e, 0xed, 0x3a, 0xd2, 0xfc, 0xb0, 0x3c, 0x3d, 0xad, 0xe5, 0xcb, + 0x5a, 0x43, 0x33, 0xba, 0xb0, 0xf7, 0x24, 0x24, 0x38, 0x22, 0x72, 0xd6, 0x1d, 0xf2, 0x7a, 0x4c, + 0x58, 0x84, 0x8e, 0xa0, 0x14, 0xe0, 0x89, 0x47, 0xb1, 0xca, 0xc0, 0x06, 0x60, 0xca, 0x55, 0x79, + 0x18, 0x1d, 0xb8, 0x91, 0x0a, 0xca, 0x02, 0xea, 0x33, 0x82, 0x1e, 0x43, 0x31, 0x24, 0x6c, 0xec, + 0x45, 0xd9, 0x83, 0x4a, 0x07, 0xe3, 0x08, 0x50, 0x87, 0x60, 0x27, 0x05, 0xf3, 0xfd, 0xad, 0x6b, + 0x14, 0xaf, 0x88, 0xf1, 0x12, 0xae, 0x2f, 0x38, 0x5f, 0x1c, 0x4e, 0x17, 0xf6, 0x7e, 0x12, 0x38, + 0x97, 0x9f, 0xb7, 0x54, 0xd0, 0x8b, 0x03, 0xfd, 0x00, 0xf6, 0x3e, 0x26, 0x1e, 0x59, 0x02, 0x9a, + 0x31, 0x73, 0x37, 0xe1, 0x46, 0xca, 0x5d, 0x40, 0x32, 0xfe, 0xa1, 0x01, 0xfa, 0xd4, 0x65, 0x51, + 0x2a, 0xac, 0x05, 0xc5, 0x81, 0xeb, 0x45, 0x24, 0x94, 0xa1, 0x6f, 0x9a, 0xaa, 0x1a, 0x39, 0xe4, + 0x1f, 0xf1, 0x77, 0xae, 0x3f, 0xec, 0x48, 0x33, 0x74, 0x0f, 0xca, 0x34, 0x74, 0x48, 0xd8, 0xeb, + 0x4f, 0x78, 0xc1, 0xc4, 0x68, 0x16, 0x5c, 0xba, 0x34, 0x8c, 0x62, 0x87, 0x12, 0x37, 0x6b, 0x4f, + 0xd0, 0xc3, 0x78, 0x08, 0xe2, 0x39, 0xa2, 0x96, 0xaa, 0xad, 0x5b, 0xe9, 0x21, 0x88, 0xe7, 0x74, + 0x89, 0x14, 0x8a, 0x8e, 0xb4, 0x45, 0xf7, 0xa0, 0x18, 0xe0, 0xa1, 0xeb, 0x0f, 0xf5, 0x3c, 0xf7, + 0xd2, 0x17, 0xbd, 0x5e, 0xc6, 0xef, 0xb0, 0xf0, 0x10, 0x76, 0xf1, 0x12, 0xcf, 0x4d, 0x90, 0x25, + 0x8b, 0x71, 0x04, 0x25, 0x91, 0x5b, 0xa6, 0x6b, 0xdb, 0x6a, 0x36, 0x59, 0x62, 0xe9, 0x61, 0xfc, + 0x47, 0x83, 0x02, 0xaf, 0xc5, 0xff, 0x87, 0xbc, 0x3c, 0x04, 0x08, 0x04, 0x80, 0x9e, 0xeb, 0xc8, + 0x79, 0xaf, 0x59, 0xeb, 0x8a, 0x34, 0xfc, 0xc4, 0x41, 0x4f, 0xe7, 0x44, 0xa9, 0x90, 0x51, 0x94, + 0xda, 0xc5, 0xe9, 0x69, 0x2d, 0xd7, 0xfa, 0xce, 0x4c, 0x9c, 0xe6, 0x34, 0xe6, 0x18, 0x90, 0x90, + 0x03, 0x21, 0x42, 0x92, 0x29, 0x8f, 0xd3, 0x95, 0xb2, 0x55, 0xbd, 0x92, 0x3a, 0x79, 0x01, 0xd7, + 0x17, 0x02, 0xca, 0x85, 0x79, 0x94, 0xaa, 0x92, 0xed, 0x72, 0x28, 0x6b, 0xe4, 0x31, 0xec, 0xc6, + 0xf2, 0xb0, 0x00, 0x2f, 0x63, 0x7d, 0x7c, 0x0a, 0xd7, 0xe6, 0x5c, 0x2f, 0x0a, 0xe4, 0x18, 0x90, + 0x10, 0x80, 0x4b, 0xcc, 0xd4, 0x42, 0xc0, 0x8b, 0x02, 0x3c, 0x02, 0x24, 0xe4, 0xe0, 0x3c, 0xb9, + 0xba, 0x01, 0xd7, 0x17, 0x9c, 0xa5, 0x92, 0xfc, 0x5d, 0x83, 0xdd, 0xb8, 0xd0, 0x16, 0x42, 0xbe, + 0x45, 0x3a, 0x72, 0x2c, 0x84, 0x92, 0x4f, 0x8f, 0xcd, 0x49, 0x7a, 0x4a, 0x45, 0xb6, 0x2f, 0xaa, + 0xd2, 0x90, 0xff, 0xe6, 0xa1, 0x24, 0xeb, 0xee, 0xfc, 0x2a, 0x72, 0x1b, 0x60, 0xe0, 0x86, 0x2c, + 0xea, 0xcd, 0x69, 0x49, 0x85, 0x3f, 0x79, 0x11, 0x0b, 0xca, 0x7b, 0x50, 0x1d, 0xb9, 0x8e, 0xe3, + 0x11, 0xf1, 0x5e, 0xc8, 0x0a, 0x88, 0x47, 0xdc, 0xe0, 0x7b, 0x50, 0xf1, 0xb0, 0x72, 0xcf, 0xf3, + 0xd7, 0xe5, 0xf8, 0x01, 0x7f, 0xf9, 0x10, 0xde, 0x09, 0x42, 0x77, 0x84, 0xc3, 0x49, 0x8f, 0x8c, + 0xb0, 0xeb, 0xe9, 0x85, 0xd8, 0xa0, 0xfd, 0x6e, 0x2c, 0x12, 0xbb, 0xda, 0xf4, 0x5f, 0x7f, 0xd9, + 0xc9, 0x87, 0xb9, 0x5f, 0x68, 0x9d, 0x2b, 0xd2, 0xea, 0x69, 0x6c, 0x34, 0x13, 0xb1, 0xe2, 0xbc, + 0x88, 0x3d, 0x82, 0x22, 0x8f, 0xc1, 0xf4, 0xd2, 0xb6, 0x3c, 0xf1, 0x30, 0x1d, 0x69, 0x8e, 0x3e, + 0x86, 0x2b, 0xaf, 0xe8, 0x88, 0xf4, 0xb0, 0xe3, 0x84, 0x84, 0x31, 0xbd, 0xbc, 0x6d, 0xeb, 0xfc, + 0x48, 0x18, 0x76, 0xaa, 0xb1, 0x9b, 0xbc, 0x89, 0xa3, 0xbc, 0xa1, 0xe1, 0x49, 0x12, 0xa5, 0x92, + 0x39, 0x4a, 0xec, 0xa6, 0xa2, 0x2c, 0x2a, 0x31, 0x64, 0x54, 0xe2, 0xe3, 0xa4, 0xbf, 0xab, 0x66, + 0xa2, 0x48, 0xfb, 0xbb, 0xd3, 0xd3, 0x1a, 0x6a, 0xed, 0xc2, 0x55, 0xee, 0xd6, 0x53, 0x06, 0xaa, + 0xef, 0x43, 0x0f, 0xa0, 0xe2, 0xbb, 0xf6, 0x49, 0xbc, 0x66, 0x4c, 0xbf, 0x22, 0x51, 0xf0, 0x66, + 0x5e, 0xf4, 0xe5, 0xcf, 0xba, 0xc7, 0x2f, 0x7e, 0x8a, 0xbd, 0x31, 0xe9, 0xcc, 0xec, 0xe6, 0x84, + 0xdc, 0x86, 0x82, 0x58, 0xa9, 0xab, 0x09, 0xeb, 0xf2, 0x9c, 0x4c, 0x77, 0xa1, 0xa4, 0xf2, 0xc3, + 0x99, 0xd4, 0xbe, 0x16, 0xfb, 0x40, 0xee, 0xde, 0xdc, 0x5a, 0x2b, 0x8b, 0xc3, 0xdb, 0xd3, 0xd3, + 0x5a, 0xad, 0xac, 0xa1, 0xeb, 0x50, 0xd8, 0xef, 0x53, 0xea, 0x21, 0x70, 0x59, 0x4f, 0x12, 0xa1, + 0xa1, 0x19, 0xbf, 0xd3, 0xa0, 0xa4, 0xd2, 0xa6, 0xcf, 0xe2, 0x6a, 0x9c, 0x13, 0xea, 0x36, 0xde, + 0x04, 0x6d, 0x37, 0x9a, 0xa8, 0x4d, 0x30, 0xbe, 0x8e, 0xf9, 0xc3, 0x22, 0x1c, 0x29, 0xb6, 0x8a, + 0x1b, 0xb4, 0x0b, 0x3b, 0xbf, 0x74, 0x03, 0x49, 0xd1, 0xf8, 0x32, 0x8e, 0x6a, 0xd3, 0xb1, 0x1f, + 0x85, 0x13, 0xc1, 0xcb, 0x8e, 0xba, 0x5d, 0xd5, 0x17, 0xab, 0xae, 0xfb, 0x1c, 0xfd, 0x9d, 0x72, + 0x5d, 0xee, 0x8b, 0x93, 0xa0, 0x67, 0xef, 0xef, 0x94, 0x6b, 0xaa, 0x2f, 0x4e, 0xc1, 0x3c, 0x5b, + 0x5f, 0x7c, 0x89, 0x70, 0xbe, 0xd2, 0x54, 0x63, 0x7c, 0x89, 0x89, 0x43, 0xad, 0x44, 0xaa, 0x85, + 0xb4, 0xd7, 0x4d, 0x71, 0x74, 0x36, 0xd5, 0xe1, 0x5a, 0xa8, 0xf5, 0x73, 0xcc, 0x4e, 0x94, 0x50, + 0xcf, 0x9a, 0xe9, 0x4b, 0x9c, 0x5d, 0xd2, 0x4c, 0x9f, 0x2f, 0xdd, 0x49, 0x33, 0x9d, 0x82, 0xa4, + 0x5a, 0xcd, 0x27, 0xaa, 0x5e, 0xcf, 0xd3, 0x6a, 0x26, 0x49, 0x53, 0xdb, 0xc4, 0x0f, 0x01, 0xba, + 0xcf, 0xbb, 0x0a, 0x62, 0xba, 0x64, 0x75, 0x28, 0x8d, 0x08, 0x63, 0x78, 0xa8, 0xc4, 0x5f, 0xdd, + 0x1a, 0xef, 0x40, 0x95, 0xfb, 0xa5, 0x1a, 0xfd, 0xd4, 0x94, 0xdf, 0x9e, 0x0d, 0xba, 0xf5, 0xb7, + 0x02, 0x94, 0x55, 0x97, 0x8f, 0x7e, 0xaf, 0x41, 0x51, 0x14, 0x29, 0x32, 0x37, 0x24, 0x7b, 0xc5, + 0x99, 0xb9, 0x6e, 0x65, 0xb6, 0x97, 0xa9, 0xad, 0xff, 0xf6, 0xaf, 0xff, 0xfc, 0x43, 0x6e, 0xcf, + 0xa8, 0x58, 0x52, 0xf3, 0xd9, 0x61, 0x42, 0xf9, 0xaf, 0x34, 0xc8, 0xc7, 0xb5, 0x89, 0x0e, 0xd6, + 0x47, 0x5d, 0x3e, 0x10, 0xd7, 0x9b, 0x19, 0xad, 0x25, 0x02, 0x83, 0x23, 0xb8, 0x85, 0xea, 0x09, + 0x02, 0xeb, 0x57, 0xae, 0x63, 0xaa, 0xaf, 0x22, 0x3d, 0xd7, 0xf9, 0x12, 0xfd, 0x49, 0x83, 0xa2, + 0xa8, 0xa4, 0x4d, 0x19, 0x59, 0x75, 0x1a, 0xde, 0x94, 0x91, 0x95, 0x07, 0x5d, 0xe3, 0x01, 0xc7, + 0xd3, 0xac, 0x1b, 0x73, 0x78, 0x64, 0x46, 0xcc, 0x14, 0xae, 0x59, 0xaa, 0xfe, 0xa8, 0x41, 0x51, + 0xd4, 0xd5, 0x26, 0x80, 0xab, 0x4e, 0xc1, 0x9b, 0x00, 0xae, 0x3e, 0xf6, 0x5a, 0xd3, 0xd3, 0x5a, + 0x25, 0xf9, 0x46, 0x24, 0xb2, 0xb7, 0xbf, 0x29, 0x7b, 0x6f, 0x20, 0x1f, 0x57, 0xcf, 0xa6, 0x65, + 0x5c, 0x3e, 0x46, 0xd7, 0xcd, 0x4c, 0xd6, 0x89, 0x50, 0x18, 0xd7, 0x38, 0x92, 0x2a, 0x9a, 0x31, + 0xa9, 0xce, 0x4f, 0x64, 0x65, 0xad, 0xf5, 0xe7, 0x02, 0x14, 0x45, 0xef, 0x89, 0x7e, 0x9d, 0x50, + 0xfb, 0x60, 0x1b, 0x55, 0xe7, 0x9b, 0xf1, 0x4d, 0xa4, 0x5a, 0x71, 0x0e, 0x33, 0x74, 0x0e, 0x06, + 0x19, 0x25, 0x4b, 0x7e, 0x6e, 0x4a, 0x56, 0xea, 0x37, 0x8a, 0xd4, 0xfb, 0x9b, 0x69, 0xba, 0x30, + 0xfa, 0xdd, 0x4c, 0xb6, 0x72, 0xec, 0x06, 0x1f, 0xbb, 0x8e, 0x74, 0x39, 0xf6, 0xf2, 0x82, 0x7c, + 0x33, 0xa3, 0xf3, 0xc1, 0x36, 0x7a, 0x66, 0xcd, 0xc2, 0x8a, 0x33, 0x96, 0x71, 0x9f, 0x23, 0xb9, + 0x5b, 0x6f, 0x24, 0x48, 0xb6, 0x12, 0xf9, 0xeb, 0x19, 0x91, 0x0f, 0xb6, 0x11, 0x33, 0x2b, 0xb4, + 0x55, 0x27, 0xae, 0xbb, 0xd3, 0xd3, 0x5a, 0x49, 0x7e, 0x87, 0x10, 0xf9, 0xda, 0x5f, 0x9f, 0xaf, + 0xd7, 0x92, 0xc0, 0xfb, 0x9b, 0x29, 0xb9, 0x80, 0xe7, 0x20, 0x83, 0xed, 0x8c, 0xbc, 0xef, 0x72, + 0x0c, 0x15, 0xa4, 0xf8, 0x92, 0x50, 0xf7, 0xdb, 0x22, 0x94, 0xd5, 0x9e, 0x78, 0x26, 0x61, 0x5e, + 0xdc, 0xab, 0xb6, 0x0b, 0x73, 0x7a, 0x3f, 0x9e, 0x09, 0x73, 0xf2, 0x39, 0xe3, 0xcc, 0xc2, 0x9c, + 0xc2, 0xd0, 0xcc, 0x68, 0xbd, 0x24, 0xcc, 0xca, 0xf2, 0x62, 0xc2, 0x9c, 0x3d, 0x23, 0x2b, 0x9b, + 0xa6, 0x39, 0x61, 0x9e, 0xe1, 0xb9, 0x54, 0x61, 0xce, 0x0e, 0x70, 0x75, 0x0b, 0x25, 0x85, 0x59, + 0x3e, 0x4e, 0x84, 0x79, 0x7d, 0xf6, 0x32, 0x0a, 0x73, 0x0a, 0x97, 0x99, 0xc9, 0x7a, 0x95, 0x30, + 0x27, 0x5f, 0xed, 0xc7, 0x50, 0xea, 0x12, 0xdf, 0xe9, 0x3e, 0xef, 0xa2, 0x1f, 0xac, 0x8f, 0x36, + 0x6b, 0xdd, 0xea, 0xef, 0x6f, 0xb1, 0x92, 0x43, 0xdd, 0xe6, 0x43, 0xdd, 0x34, 0xd0, 0xc2, 0xa4, + 0xbf, 0xb4, 0xd8, 0x88, 0x1d, 0x6a, 0xfb, 0xaa, 0xa8, 0xda, 0xdf, 0x6a, 0x5f, 0x7f, 0xf4, 0x8d, + 0x86, 0xfc, 0x59, 0x69, 0x19, 0x3f, 0x87, 0xab, 0xcf, 0xe8, 0x2b, 0xbf, 0xd1, 0x26, 0x1e, 0x1e, + 0xe1, 0xd0, 0xb5, 0x51, 0xeb, 0x55, 0x14, 0x05, 0xec, 0xd0, 0xb2, 0xb2, 0xff, 0x41, 0x56, 0xbf, + 0xf9, 0x59, 0x5f, 0xf9, 0x7f, 0x98, 0xb4, 0x5c, 0x36, 0x1d, 0xb5, 0x76, 0xee, 0x9b, 0xf7, 0xf6, + 0x73, 0x5a, 0xae, 0xb5, 0x8b, 0x83, 0xc0, 0x73, 0x6d, 0xde, 0x7d, 0x59, 0x9f, 0x31, 0xea, 0x1f, + 0x2e, 0x3d, 0xf9, 0xd9, 0xc3, 0x33, 0xff, 0x25, 0x77, 0x14, 0xf4, 0xfb, 0x45, 0x7e, 0x10, 0x78, + 0xf0, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x0b, 0x1d, 0xa3, 0xd1, 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -966,8 +1888,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for Profiles service - +// ProfilesClient is the client API for Profiles service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ProfilesClient interface { Create(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*CreateProfileResponse, error) Read(ctx context.Context, in *ReadProfileRequest, opts ...grpc.CallOption) (*ReadProfileResponse, error) @@ -986,7 +1909,7 @@ func NewProfilesClient(cc *grpc.ClientConn) ProfilesClient { func (c *profilesClient) Create(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*CreateProfileResponse, error) { out := new(CreateProfileResponse) - err := grpc.Invoke(ctx, "/api.contacts.Profiles/Create", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Profiles/Create", in, out, opts...) if err != nil { return nil, err } @@ -995,7 +1918,7 @@ func (c *profilesClient) Create(ctx context.Context, in *CreateProfileRequest, o func (c *profilesClient) Read(ctx context.Context, in *ReadProfileRequest, opts ...grpc.CallOption) (*ReadProfileResponse, error) { out := new(ReadProfileResponse) - err := grpc.Invoke(ctx, "/api.contacts.Profiles/Read", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Profiles/Read", in, out, opts...) if err != nil { return nil, err } @@ -1004,7 +1927,7 @@ func (c *profilesClient) Read(ctx context.Context, in *ReadProfileRequest, opts func (c *profilesClient) Update(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*UpdateProfileResponse, error) { out := new(UpdateProfileResponse) - err := grpc.Invoke(ctx, "/api.contacts.Profiles/Update", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Profiles/Update", in, out, opts...) if err != nil { return nil, err } @@ -1013,7 +1936,7 @@ func (c *profilesClient) Update(ctx context.Context, in *UpdateProfileRequest, o func (c *profilesClient) Delete(ctx context.Context, in *DeleteProfileRequest, opts ...grpc.CallOption) (*DeleteProfileResponse, error) { out := new(DeleteProfileResponse) - err := grpc.Invoke(ctx, "/api.contacts.Profiles/Delete", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Profiles/Delete", in, out, opts...) if err != nil { return nil, err } @@ -1022,15 +1945,14 @@ func (c *profilesClient) Delete(ctx context.Context, in *DeleteProfileRequest, o func (c *profilesClient) List(ctx context.Context, in *ListProfileRequest, opts ...grpc.CallOption) (*ListProfilesResponse, error) { out := new(ListProfilesResponse) - err := grpc.Invoke(ctx, "/api.contacts.Profiles/List", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Profiles/List", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Profiles service - +// ProfilesServer is the server API for Profiles service. type ProfilesServer interface { Create(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error) Read(context.Context, *ReadProfileRequest) (*ReadProfileResponse, error) @@ -1053,7 +1975,7 @@ func _Profiles_Create_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Profiles/Create", + FullMethod: "/api.examples.contacts.v1.Profiles/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProfilesServer).Create(ctx, req.(*CreateProfileRequest)) @@ -1071,7 +1993,7 @@ func _Profiles_Read_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Profiles/Read", + FullMethod: "/api.examples.contacts.v1.Profiles/Read", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProfilesServer).Read(ctx, req.(*ReadProfileRequest)) @@ -1089,7 +2011,7 @@ func _Profiles_Update_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Profiles/Update", + FullMethod: "/api.examples.contacts.v1.Profiles/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProfilesServer).Update(ctx, req.(*UpdateProfileRequest)) @@ -1107,7 +2029,7 @@ func _Profiles_Delete_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Profiles/Delete", + FullMethod: "/api.examples.contacts.v1.Profiles/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProfilesServer).Delete(ctx, req.(*DeleteProfileRequest)) @@ -1125,7 +2047,7 @@ func _Profiles_List_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Profiles/List", + FullMethod: "/api.examples.contacts.v1.Profiles/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProfilesServer).List(ctx, req.(*ListProfileRequest)) @@ -1134,7 +2056,7 @@ func _Profiles_List_Handler(srv interface{}, ctx context.Context, dec func(inter } var _Profiles_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.contacts.Profiles", + ServiceName: "api.examples.contacts.v1.Profiles", HandlerType: (*ProfilesServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1159,11 +2081,12 @@ var _Profiles_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "pkg/pb/contacts.proto", + Metadata: "github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto", } -// Client API for Groups service - +// GroupsClient is the client API for Groups service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type GroupsClient interface { Create(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) Read(ctx context.Context, in *ReadGroupRequest, opts ...grpc.CallOption) (*ReadGroupResponse, error) @@ -1182,7 +2105,7 @@ func NewGroupsClient(cc *grpc.ClientConn) GroupsClient { func (c *groupsClient) Create(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) { out := new(CreateGroupResponse) - err := grpc.Invoke(ctx, "/api.contacts.Groups/Create", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Groups/Create", in, out, opts...) if err != nil { return nil, err } @@ -1191,7 +2114,7 @@ func (c *groupsClient) Create(ctx context.Context, in *CreateGroupRequest, opts func (c *groupsClient) Read(ctx context.Context, in *ReadGroupRequest, opts ...grpc.CallOption) (*ReadGroupResponse, error) { out := new(ReadGroupResponse) - err := grpc.Invoke(ctx, "/api.contacts.Groups/Read", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Groups/Read", in, out, opts...) if err != nil { return nil, err } @@ -1200,7 +2123,7 @@ func (c *groupsClient) Read(ctx context.Context, in *ReadGroupRequest, opts ...g func (c *groupsClient) Update(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*UpdateGroupResponse, error) { out := new(UpdateGroupResponse) - err := grpc.Invoke(ctx, "/api.contacts.Groups/Update", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Groups/Update", in, out, opts...) if err != nil { return nil, err } @@ -1209,7 +2132,7 @@ func (c *groupsClient) Update(ctx context.Context, in *UpdateGroupRequest, opts func (c *groupsClient) Delete(ctx context.Context, in *DeleteGroupRequest, opts ...grpc.CallOption) (*DeleteGroupResponse, error) { out := new(DeleteGroupResponse) - err := grpc.Invoke(ctx, "/api.contacts.Groups/Delete", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Groups/Delete", in, out, opts...) if err != nil { return nil, err } @@ -1218,15 +2141,14 @@ func (c *groupsClient) Delete(ctx context.Context, in *DeleteGroupRequest, opts func (c *groupsClient) List(ctx context.Context, in *ListGroupRequest, opts ...grpc.CallOption) (*ListGroupsResponse, error) { out := new(ListGroupsResponse) - err := grpc.Invoke(ctx, "/api.contacts.Groups/List", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Groups/List", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Groups service - +// GroupsServer is the server API for Groups service. type GroupsServer interface { Create(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error) Read(context.Context, *ReadGroupRequest) (*ReadGroupResponse, error) @@ -1249,7 +2171,7 @@ func _Groups_Create_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Groups/Create", + FullMethod: "/api.examples.contacts.v1.Groups/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupsServer).Create(ctx, req.(*CreateGroupRequest)) @@ -1267,7 +2189,7 @@ func _Groups_Read_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Groups/Read", + FullMethod: "/api.examples.contacts.v1.Groups/Read", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupsServer).Read(ctx, req.(*ReadGroupRequest)) @@ -1285,7 +2207,7 @@ func _Groups_Update_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Groups/Update", + FullMethod: "/api.examples.contacts.v1.Groups/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupsServer).Update(ctx, req.(*UpdateGroupRequest)) @@ -1303,7 +2225,7 @@ func _Groups_Delete_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Groups/Delete", + FullMethod: "/api.examples.contacts.v1.Groups/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupsServer).Delete(ctx, req.(*DeleteGroupRequest)) @@ -1321,7 +2243,7 @@ func _Groups_List_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Groups/List", + FullMethod: "/api.examples.contacts.v1.Groups/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GroupsServer).List(ctx, req.(*ListGroupRequest)) @@ -1330,7 +2252,7 @@ func _Groups_List_Handler(srv interface{}, ctx context.Context, dec func(interfa } var _Groups_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.contacts.Groups", + ServiceName: "api.examples.contacts.v1.Groups", HandlerType: (*GroupsServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1355,11 +2277,12 @@ var _Groups_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "pkg/pb/contacts.proto", + Metadata: "github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto", } -// Client API for Contacts service - +// ContactsClient is the client API for Contacts service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ContactsClient interface { Create(ctx context.Context, in *CreateContactRequest, opts ...grpc.CallOption) (*CreateContactResponse, error) Read(ctx context.Context, in *ReadContactRequest, opts ...grpc.CallOption) (*ReadContactResponse, error) @@ -1379,7 +2302,7 @@ func NewContactsClient(cc *grpc.ClientConn) ContactsClient { func (c *contactsClient) Create(ctx context.Context, in *CreateContactRequest, opts ...grpc.CallOption) (*CreateContactResponse, error) { out := new(CreateContactResponse) - err := grpc.Invoke(ctx, "/api.contacts.Contacts/Create", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Contacts/Create", in, out, opts...) if err != nil { return nil, err } @@ -1388,7 +2311,7 @@ func (c *contactsClient) Create(ctx context.Context, in *CreateContactRequest, o func (c *contactsClient) Read(ctx context.Context, in *ReadContactRequest, opts ...grpc.CallOption) (*ReadContactResponse, error) { out := new(ReadContactResponse) - err := grpc.Invoke(ctx, "/api.contacts.Contacts/Read", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Contacts/Read", in, out, opts...) if err != nil { return nil, err } @@ -1397,7 +2320,7 @@ func (c *contactsClient) Read(ctx context.Context, in *ReadContactRequest, opts func (c *contactsClient) Update(ctx context.Context, in *UpdateContactRequest, opts ...grpc.CallOption) (*UpdateContactResponse, error) { out := new(UpdateContactResponse) - err := grpc.Invoke(ctx, "/api.contacts.Contacts/Update", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Contacts/Update", in, out, opts...) if err != nil { return nil, err } @@ -1406,7 +2329,7 @@ func (c *contactsClient) Update(ctx context.Context, in *UpdateContactRequest, o func (c *contactsClient) Delete(ctx context.Context, in *DeleteContactRequest, opts ...grpc.CallOption) (*DeleteContactResponse, error) { out := new(DeleteContactResponse) - err := grpc.Invoke(ctx, "/api.contacts.Contacts/Delete", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Contacts/Delete", in, out, opts...) if err != nil { return nil, err } @@ -1415,7 +2338,7 @@ func (c *contactsClient) Delete(ctx context.Context, in *DeleteContactRequest, o func (c *contactsClient) List(ctx context.Context, in *ListContactRequest, opts ...grpc.CallOption) (*ListContactsResponse, error) { out := new(ListContactsResponse) - err := grpc.Invoke(ctx, "/api.contacts.Contacts/List", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Contacts/List", in, out, opts...) if err != nil { return nil, err } @@ -1424,15 +2347,14 @@ func (c *contactsClient) List(ctx context.Context, in *ListContactRequest, opts func (c *contactsClient) SendSMS(ctx context.Context, in *SMSRequest, opts ...grpc.CallOption) (*SMSResponse, error) { out := new(SMSResponse) - err := grpc.Invoke(ctx, "/api.contacts.Contacts/SendSMS", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/api.examples.contacts.v1.Contacts/SendSMS", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Contacts service - +// ContactsServer is the server API for Contacts service. type ContactsServer interface { Create(context.Context, *CreateContactRequest) (*CreateContactResponse, error) Read(context.Context, *ReadContactRequest) (*ReadContactResponse, error) @@ -1456,7 +2378,7 @@ func _Contacts_Create_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Contacts/Create", + FullMethod: "/api.examples.contacts.v1.Contacts/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContactsServer).Create(ctx, req.(*CreateContactRequest)) @@ -1474,7 +2396,7 @@ func _Contacts_Read_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Contacts/Read", + FullMethod: "/api.examples.contacts.v1.Contacts/Read", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContactsServer).Read(ctx, req.(*ReadContactRequest)) @@ -1492,7 +2414,7 @@ func _Contacts_Update_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Contacts/Update", + FullMethod: "/api.examples.contacts.v1.Contacts/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContactsServer).Update(ctx, req.(*UpdateContactRequest)) @@ -1510,7 +2432,7 @@ func _Contacts_Delete_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Contacts/Delete", + FullMethod: "/api.examples.contacts.v1.Contacts/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContactsServer).Delete(ctx, req.(*DeleteContactRequest)) @@ -1528,7 +2450,7 @@ func _Contacts_List_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Contacts/List", + FullMethod: "/api.examples.contacts.v1.Contacts/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContactsServer).List(ctx, req.(*ListContactRequest)) @@ -1546,7 +2468,7 @@ func _Contacts_SendSMS_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.contacts.Contacts/SendSMS", + FullMethod: "/api.examples.contacts.v1.Contacts/SendSMS", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContactsServer).SendSMS(ctx, req.(*SMSRequest)) @@ -1555,7 +2477,7 @@ func _Contacts_SendSMS_Handler(srv interface{}, ctx context.Context, dec func(in } var _Contacts_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.contacts.Contacts", + ServiceName: "api.examples.contacts.v1.Contacts", HandlerType: (*ContactsServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1584,119 +2506,5 @@ var _Contacts_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "pkg/pb/contacts.proto", -} - -func init() { proto.RegisterFile("pkg/pb/contacts.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 1725 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xdd, 0x6e, 0xe3, 0xc6, - 0x15, 0x2e, 0x65, 0x59, 0x3f, 0xc7, 0xce, 0xc6, 0x3b, 0xb6, 0xbb, 0x94, 0xba, 0x9b, 0x28, 0x2c, - 0x0a, 0x2c, 0xec, 0x4a, 0xdc, 0xd5, 0x2e, 0xda, 0xae, 0x17, 0x05, 0x12, 0x39, 0xc9, 0x22, 0x8b, - 0x6e, 0x1a, 0x48, 0x68, 0x81, 0x16, 0x08, 0xd4, 0x11, 0x39, 0x92, 0x27, 0xa6, 0x38, 0x0c, 0x87, - 0x6a, 0xaa, 0x04, 0x01, 0x8a, 0x14, 0xe8, 0x03, 0xb4, 0x37, 0x7d, 0x15, 0xeb, 0xa2, 0xc8, 0x55, - 0x1f, 0xa0, 0x05, 0x7a, 0x57, 0x14, 0x05, 0xda, 0x8b, 0xbe, 0x45, 0xc1, 0xf9, 0xa1, 0x48, 0x8a, - 0xd2, 0x2a, 0x76, 0x91, 0x8b, 0xdc, 0x18, 0x24, 0xe7, 0xfc, 0xcd, 0x99, 0xef, 0x7c, 0x73, 0x8e, - 0x0c, 0xc7, 0xc1, 0xe5, 0xc4, 0x0e, 0x46, 0xb6, 0xc3, 0xfc, 0x08, 0x3b, 0x11, 0xef, 0x04, 0x21, - 0x8b, 0x18, 0xda, 0xc7, 0x01, 0xed, 0xe8, 0x6f, 0xcd, 0xd6, 0x84, 0xb1, 0x89, 0x47, 0x6c, 0xb1, - 0x36, 0x9a, 0x8d, 0xed, 0x31, 0x25, 0x9e, 0x3b, 0x9c, 0x62, 0x7e, 0x29, 0xe5, 0x9b, 0x77, 0x95, - 0x04, 0x0e, 0xa8, 0x8d, 0x7d, 0x9f, 0x45, 0x38, 0xa2, 0xcc, 0x57, 0xd6, 0x9a, 0x4f, 0x27, 0x34, - 0xba, 0x98, 0x8d, 0x3a, 0x0e, 0x9b, 0xda, 0xde, 0x7c, 0x1c, 0x49, 0x43, 0x4e, 0x7b, 0x42, 0xfc, - 0xf6, 0xaf, 0xb1, 0x47, 0x5d, 0x1c, 0x11, 0x7b, 0xe5, 0x41, 0x29, 0x7f, 0x3f, 0x25, 0xcc, 0x3f, - 0xc1, 0x93, 0x09, 0x09, 0x6d, 0x16, 0x08, 0xf3, 0x05, 0xae, 0xce, 0x52, 0xae, 0xa8, 0x3f, 0x66, - 0x23, 0x8f, 0xfd, 0x86, 0x05, 0xc4, 0x4f, 0xbb, 0x9c, 0xb0, 0x70, 0x9a, 0x98, 0x88, 0x5f, 0x94, - 0xee, 0x93, 0x6d, 0x75, 0xa3, 0x79, 0x40, 0xb8, 0xfc, 0xab, 0x54, 0x9f, 0xaf, 0x53, 0xc5, 0x91, - 0x87, 0x79, 0x1b, 0x07, 0x41, 0x3b, 0x62, 0xcc, 0xbb, 0xa4, 0x91, 0xfd, 0xf1, 0x8c, 0x84, 0x73, - 0xdb, 0x61, 0x9e, 0x47, 0x9c, 0x38, 0x84, 0x21, 0x0b, 0x48, 0x88, 0x23, 0x16, 0x6a, 0x5b, 0xef, - 0x6c, 0x6f, 0x2b, 0x0c, 0x1c, 0x3b, 0x24, 0x9c, 0xcd, 0x42, 0x87, 0x24, 0x0f, 0xd2, 0x8c, 0xf5, - 0x77, 0x03, 0xaa, 0x1f, 0x84, 0x6c, 0x4c, 0x3d, 0x82, 0x7e, 0x08, 0x25, 0xea, 0x9a, 0x46, 0xcb, - 0xb8, 0xbf, 0xd7, 0x3d, 0xee, 0x08, 0x3b, 0x9d, 0x30, 0x70, 0x3a, 0xef, 0xb9, 0xc4, 0x8f, 0xe8, - 0x98, 0x92, 0xb0, 0x77, 0xb0, 0xb8, 0x6a, 0xec, 0x03, 0xa0, 0x0a, 0x27, 0x21, 0xc5, 0xde, 0x7d, - 0xa3, 0x5f, 0xa2, 0x2e, 0x42, 0x50, 0xf6, 0xf1, 0x94, 0x98, 0xa5, 0x96, 0x71, 0xbf, 0xde, 0x17, - 0xcf, 0xe8, 0x08, 0x76, 0x7d, 0x16, 0x11, 0x6e, 0xee, 0x88, 0x8f, 0xf2, 0x05, 0x3d, 0x84, 0x9a, - 0xc6, 0x8b, 0x59, 0x6e, 0xed, 0x48, 0x47, 0x29, 0x10, 0x75, 0xce, 0xe5, 0x43, 0x3f, 0x11, 0x43, - 0xa7, 0x50, 0x99, 0x84, 0x6c, 0x16, 0x70, 0x73, 0x57, 0x28, 0x1c, 0x66, 0x15, 0x9e, 0xc5, 0x6b, - 0x7d, 0x25, 0x72, 0x56, 0x5b, 0x5c, 0x35, 0xca, 0x35, 0xa3, 0x65, 0x58, 0xcf, 0xe0, 0xe8, 0x3c, - 0x24, 0x38, 0x22, 0x6a, 0x77, 0x7d, 0xf2, 0xf1, 0x8c, 0xf0, 0x08, 0xd9, 0x50, 0x0d, 0xf0, 0xdc, - 0x63, 0x38, 0xb5, 0xd3, 0xb4, 0x3d, 0x2d, 0xae, 0xa5, 0xac, 0x77, 0xe1, 0x38, 0x67, 0x88, 0x07, - 0xcc, 0xe7, 0x04, 0xb5, 0xa1, 0x12, 0x12, 0x3e, 0xf3, 0xa2, 0xcd, 0x86, 0x94, 0x90, 0xf5, 0x14, - 0x50, 0x9f, 0x60, 0x37, 0x17, 0xce, 0xf7, 0x5e, 0x9a, 0xf3, 0x38, 0xc3, 0xd6, 0xdb, 0x70, 0x98, - 0x51, 0xbe, 0x5e, 0x08, 0xcf, 0xe0, 0xe8, 0x67, 0x81, 0xfb, 0xff, 0xc9, 0x49, 0xce, 0xd0, 0xf5, - 0x02, 0xfa, 0x31, 0x1c, 0xbd, 0x4d, 0x3c, 0xb2, 0x12, 0xd0, 0x96, 0x59, 0xb9, 0x03, 0xc7, 0x39, - 0x75, 0x19, 0x86, 0xf5, 0x4f, 0x03, 0xd0, 0x4f, 0x28, 0x8f, 0x56, 0xf6, 0x59, 0x19, 0x53, 0x2f, - 0x22, 0xa1, 0x32, 0x7d, 0xa7, 0xa3, 0x2b, 0x47, 0x84, 0xf9, 0xae, 0x58, 0xa3, 0xfe, 0xa4, 0xaf, - 0xc4, 0xd0, 0x03, 0xa8, 0xb1, 0xd0, 0x25, 0xe1, 0x70, 0x34, 0x17, 0xe0, 0x8e, 0xa3, 0xc9, 0xa8, - 0x0c, 0x58, 0x18, 0xc5, 0x0a, 0x55, 0x21, 0xd6, 0x9b, 0xa3, 0xc7, 0xb1, 0x0b, 0xe2, 0xb9, 0x12, - 0xf7, 0x7b, 0xdd, 0xbb, 0x79, 0x17, 0xc4, 0x73, 0x07, 0x44, 0x15, 0x75, 0x5f, 0xc9, 0xa2, 0x07, - 0x50, 0x09, 0xf0, 0x84, 0xfa, 0x13, 0xb3, 0x2c, 0xb4, 0xcc, 0xac, 0xd6, 0x07, 0xf1, 0x1a, 0x96, - 0x1a, 0x52, 0x2e, 0x3e, 0xca, 0xd4, 0x06, 0x79, 0x72, 0x00, 0x36, 0x54, 0x65, 0x6e, 0xb9, 0x69, - 0x14, 0xd5, 0x57, 0x72, 0x94, 0x4a, 0xca, 0xfa, 0x8f, 0x01, 0xbb, 0xa2, 0x86, 0xbe, 0x8e, 0xf2, - 0x7f, 0x0c, 0x10, 0xc8, 0x00, 0x86, 0xd4, 0x55, 0x7b, 0x5d, 0x73, 0xbe, 0x75, 0x25, 0xf8, 0x9e, - 0x8b, 0x9e, 0xa4, 0x48, 0x63, 0x77, 0x03, 0x69, 0xf4, 0x2a, 0x8b, 0xab, 0x46, 0xa9, 0xfb, 0xad, - 0x25, 0x79, 0xa4, 0xf8, 0xe0, 0x1c, 0x90, 0x2c, 0x63, 0x49, 0x18, 0x0a, 0x11, 0xed, 0x3c, 0xf2, - 0x0b, 0xd9, 0x25, 0xc1, 0x7d, 0x0f, 0x0e, 0x33, 0x46, 0x54, 0xd2, 0x4f, 0x73, 0xa8, 0x2f, 0xa6, - 0x28, 0x85, 0xf9, 0x27, 0x70, 0x10, 0x97, 0x72, 0x26, 0x8c, 0x2d, 0xf1, 0xfe, 0x26, 0xdc, 0x4e, - 0xa9, 0x5e, 0xc7, 0xf9, 0x39, 0x20, 0x59, 0xb8, 0x37, 0xcc, 0x42, 0xc6, 0xc8, 0x75, 0x02, 0x79, - 0x0a, 0x48, 0x96, 0xee, 0x75, 0xf2, 0x70, 0x0c, 0x87, 0x19, 0x65, 0x55, 0xf5, 0xff, 0x30, 0xe0, - 0x20, 0x2e, 0x8a, 0x8c, 0xc9, 0x6f, 0x50, 0xcd, 0x9f, 0x4b, 0x52, 0x13, 0xdb, 0xe3, 0x29, 0xca, - 0xcd, 0x55, 0x7c, 0xf1, 0xe1, 0xe9, 0x7a, 0xff, 0x4b, 0x19, 0xaa, 0xaa, 0x5e, 0xae, 0x5f, 0xf1, - 0xf7, 0x00, 0xc6, 0x34, 0xe4, 0xd1, 0x30, 0x55, 0xf7, 0x75, 0xf1, 0xe5, 0xfd, 0xb8, 0xf8, 0x5f, - 0x87, 0xbd, 0x29, 0x75, 0x5d, 0x8f, 0xc8, 0x75, 0x49, 0x01, 0x20, 0x3f, 0x09, 0x81, 0xef, 0x40, - 0xdd, 0xc3, 0x5a, 0xbd, 0x2c, 0x96, 0x6b, 0xf1, 0x07, 0xb1, 0xf8, 0x18, 0x5e, 0x09, 0x42, 0x3a, - 0xc5, 0xe1, 0x7c, 0x48, 0xa6, 0x98, 0x7a, 0xe6, 0x6e, 0x2c, 0xd0, 0x7b, 0x35, 0x2e, 0xee, 0x03, - 0x63, 0xf1, 0xdf, 0x2f, 0x77, 0xca, 0x61, 0xe9, 0x57, 0x46, 0x7f, 0x5f, 0x49, 0xbd, 0x13, 0x0b, - 0x2d, 0x09, 0xa7, 0x92, 0x26, 0x9c, 0x53, 0xa8, 0x08, 0x1b, 0xdc, 0xac, 0x16, 0xe5, 0x46, 0xa8, - 0xf6, 0x95, 0x08, 0xfa, 0x11, 0xec, 0x5f, 0xb0, 0x29, 0x19, 0x62, 0xd7, 0x0d, 0x09, 0xe7, 0x66, - 0xad, 0xe8, 0x0a, 0x7b, 0x4b, 0x2e, 0xf6, 0xf7, 0x62, 0x51, 0xf5, 0x12, 0x6b, 0x7e, 0xc2, 0xc2, - 0xcb, 0x44, 0xb3, 0xbe, 0x51, 0x33, 0x16, 0xd5, 0x9a, 0x59, 0x46, 0x84, 0x2d, 0x19, 0xf1, 0x3c, - 0xe9, 0x89, 0xf6, 0xd6, 0x1e, 0x79, 0xef, 0xdb, 0x8b, 0xab, 0x06, 0xea, 0x1e, 0xc0, 0x2d, 0x21, - 0x3a, 0xd4, 0xab, 0xba, 0x57, 0x42, 0x8f, 0xa0, 0xee, 0x53, 0xe7, 0x32, 0x3e, 0x03, 0x6e, 0xee, - 0x2b, 0xcf, 0xa2, 0xd1, 0x95, 0x3d, 0xeb, 0xf3, 0xc1, 0x4f, 0xdf, 0xff, 0x39, 0xf6, 0x66, 0xa4, - 0xbf, 0x94, 0x4b, 0x11, 0xaa, 0x03, 0xbb, 0x32, 0xf3, 0xb7, 0x12, 0x14, 0x95, 0x05, 0x38, 0x4e, - 0xa1, 0xaa, 0xf3, 0x20, 0x90, 0xd1, 0xbb, 0x1d, 0xeb, 0x40, 0xe9, 0x41, 0xea, 0xec, 0xb4, 0xc4, - 0xd9, 0xbd, 0xc5, 0x55, 0xa3, 0x51, 0x33, 0xd0, 0x21, 0xec, 0x9e, 0x8c, 0x18, 0xf3, 0x10, 0x50, - 0x3e, 0x54, 0x07, 0xdb, 0x32, 0xac, 0xdf, 0x19, 0x50, 0xd5, 0xa9, 0x32, 0x97, 0x76, 0x0d, 0x71, - 0xc6, 0xfa, 0x35, 0xbe, 0x80, 0x1c, 0x1a, 0xcd, 0xf5, 0x05, 0x14, 0x3f, 0xc7, 0x78, 0xe0, 0x11, - 0x8e, 0x34, 0xfa, 0xe4, 0x0b, 0x3a, 0x80, 0x9d, 0x4f, 0x69, 0xa0, 0x20, 0x17, 0x3f, 0xc6, 0x56, - 0x1d, 0x36, 0xf3, 0xa3, 0x70, 0x2e, 0x71, 0xd6, 0xd7, 0xaf, 0x45, 0xbd, 0xa4, 0xee, 0x4e, 0xb7, - 0xec, 0x9b, 0xb4, 0xf8, 0x6a, 0x2f, 0x99, 0x18, 0xda, 0xae, 0x6f, 0xd2, 0xe2, 0xb9, 0x5e, 0x32, - 0x17, 0xce, 0x57, 0xeb, 0x25, 0x6f, 0x18, 0xc2, 0x67, 0xba, 0x97, 0xbc, 0x61, 0x4e, 0x50, 0x37, - 0x61, 0x4f, 0xc9, 0xb6, 0xcd, 0x8e, 0x9c, 0x12, 0x3b, 0x7a, 0x8e, 0x94, 0x04, 0xfa, 0x02, 0xf3, - 0x4b, 0xcd, 0x9d, 0xcb, 0xfe, 0xf3, 0x86, 0x9b, 0x48, 0xfa, 0xcf, 0xeb, 0x65, 0x32, 0xe9, 0x3f, - 0x73, 0x61, 0xe8, 0xee, 0xec, 0x5c, 0x97, 0xdc, 0xb6, 0xdd, 0x59, 0x92, 0x1c, 0xcd, 0xd6, 0x3f, - 0x00, 0x18, 0xbc, 0x18, 0xe8, 0xb0, 0xf2, 0x95, 0x66, 0x42, 0x75, 0x4a, 0x38, 0xc7, 0x13, 0xcd, - 0xc1, 0xfa, 0xd5, 0x7a, 0x05, 0xf6, 0x84, 0x5e, 0xae, 0x1f, 0x5e, 0x39, 0xab, 0x6f, 0xca, 0xdd, - 0xd8, 0xfd, 0x57, 0x19, 0x6a, 0xba, 0x19, 0x46, 0x53, 0xa8, 0xc8, 0x32, 0x43, 0x56, 0x2e, 0xbf, - 0x05, 0x13, 0x61, 0xf3, 0xbb, 0x1b, 0x65, 0x54, 0x06, 0x9b, 0x5f, 0xfc, 0xed, 0xdf, 0x7f, 0x2c, - 0x1d, 0x59, 0x75, 0x5b, 0xb1, 0x30, 0x3f, 0x4b, 0x10, 0xcc, 0xa0, 0x1c, 0x17, 0x14, 0x6a, 0x65, - 0x0d, 0xad, 0x4e, 0x7b, 0xcd, 0x37, 0x36, 0x48, 0x28, 0x47, 0x96, 0x70, 0x74, 0x17, 0x35, 0x13, - 0x47, 0xf6, 0x67, 0xd4, 0xed, 0xe8, 0xb1, 0x7d, 0x48, 0xdd, 0xcf, 0xd1, 0xef, 0x0d, 0xa8, 0x48, - 0xfc, 0xe7, 0x37, 0x58, 0x34, 0xde, 0xe5, 0x37, 0x58, 0x38, 0xb9, 0x59, 0x8f, 0x84, 0xdf, 0x76, - 0xd3, 0x4a, 0xf9, 0x55, 0x1b, 0xec, 0xe4, 0xfc, 0x2f, 0x77, 0xfe, 0x85, 0x01, 0x15, 0x59, 0x01, - 0xf9, 0x40, 0x8a, 0xc6, 0xba, 0x7c, 0x20, 0xc5, 0xb3, 0x9b, 0xbd, 0xb8, 0x6a, 0xd4, 0x93, 0x1f, - 0x25, 0x64, 0x36, 0x4e, 0x36, 0x65, 0x63, 0x08, 0xe5, 0x18, 0xdb, 0xf9, 0xf4, 0xaf, 0xce, 0x7f, - 0x4d, 0x6b, 0xad, 0x44, 0x52, 0xa2, 0xd6, 0x6d, 0xe1, 0x71, 0x0f, 0x2d, 0x0f, 0xba, 0x29, 0xc6, - 0x8a, 0x9a, 0xd1, 0xfd, 0x73, 0x19, 0x2a, 0xb2, 0xf9, 0x42, 0x93, 0x04, 0x61, 0xad, 0x22, 0xf4, - 0xa4, 0x3b, 0xd0, 0xfc, 0xa1, 0x17, 0x0c, 0x10, 0x96, 0x29, 0x9c, 0x22, 0xab, 0x6a, 0xab, 0xdf, - 0x31, 0x92, 0x0c, 0x53, 0x85, 0xad, 0xd7, 0x56, 0x91, 0x93, 0x71, 0xf2, 0xfa, 0xda, 0x75, 0xe5, - 0xa2, 0x25, 0x5c, 0x34, 0x91, 0xa9, 0x5c, 0xac, 0xe6, 0xf1, 0xb7, 0x4b, 0x54, 0xb5, 0x8a, 0x10, - 0xb3, 0x69, 0x53, 0x05, 0xf3, 0x80, 0xf5, 0x50, 0x78, 0x3c, 0x6d, 0xb6, 0x12, 0x8f, 0x2f, 0xc5, - 0xd3, 0xa7, 0x09, 0x9c, 0x5a, 0x45, 0x50, 0xd9, 0x14, 0x41, 0xd1, 0x40, 0x70, 0xba, 0xb8, 0x6a, - 0x54, 0xd5, 0x78, 0x2b, 0xb7, 0x7f, 0xb2, 0x7e, 0xfb, 0xbf, 0x50, 0x30, 0x7a, 0x6d, 0x15, 0x24, - 0x19, 0xbf, 0xad, 0x35, 0xeb, 0x4b, 0x08, 0xbd, 0x2a, 0x7c, 0xd5, 0x91, 0x3e, 0xcd, 0x04, 0x40, - 0x5f, 0xee, 0x42, 0x4d, 0xdf, 0x09, 0x2f, 0x23, 0xa9, 0x2c, 0x55, 0x17, 0x93, 0x54, 0xfe, 0xda, - 0x59, 0x92, 0x54, 0x32, 0x00, 0x6f, 0x43, 0x52, 0x39, 0x57, 0x6f, 0x6c, 0x90, 0x58, 0x21, 0x29, - 0x2d, 0xf6, 0xd5, 0x49, 0x6a, 0xf3, 0x06, 0x0b, 0xaf, 0xf7, 0x14, 0x49, 0x2d, 0xfd, 0xde, 0x98, - 0xa4, 0x36, 0x07, 0x52, 0x7c, 0xc1, 0x2b, 0x92, 0x52, 0x9f, 0x13, 0x92, 0x5a, 0x9f, 0x8d, 0x0d, - 0x24, 0x95, 0xf3, 0x6f, 0xad, 0x95, 0x28, 0x22, 0xa9, 0xe4, 0x67, 0xd2, 0x0f, 0xa1, 0x3a, 0x20, - 0xbe, 0x3b, 0x78, 0x31, 0x40, 0x66, 0xd6, 0xc2, 0xb2, 0x81, 0x68, 0x36, 0x0a, 0x56, 0x94, 0xc9, - 0x7b, 0xc2, 0xe4, 0x1d, 0x0b, 0x65, 0x36, 0xf1, 0xb9, 0xcd, 0xa7, 0xfc, 0xcc, 0x38, 0xd1, 0x10, - 0xee, 0xfd, 0xd5, 0xf8, 0xc3, 0x5b, 0x7f, 0x32, 0x90, 0xbf, 0x04, 0xb2, 0xf5, 0x21, 0xdc, 0x7a, - 0xce, 0x2e, 0xfc, 0x56, 0x8f, 0x78, 0x78, 0x8a, 0x43, 0xea, 0xa0, 0xee, 0x45, 0x14, 0x05, 0xfc, - 0xcc, 0xb6, 0x37, 0xff, 0x46, 0xad, 0x1d, 0xb5, 0x71, 0x10, 0x34, 0xef, 0x7c, 0x34, 0xd2, 0xfa, - 0x6f, 0x26, 0x97, 0xbd, 0xc3, 0xa6, 0xdd, 0x9d, 0x87, 0x9d, 0x07, 0x27, 0x25, 0xa3, 0xd4, 0x3d, - 0xc0, 0x41, 0xe0, 0x51, 0x47, 0xdc, 0xfb, 0xf6, 0x47, 0x9c, 0xf9, 0x67, 0x2b, 0x5f, 0x7e, 0xf9, - 0x78, 0x7b, 0x8f, 0xb6, 0xfc, 0x9f, 0xc6, 0xd3, 0x60, 0x34, 0xaa, 0x88, 0x56, 0xf3, 0xd1, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x48, 0x1a, 0x3d, 0xc0, 0xe7, 0x18, 0x00, 0x00, + Metadata: "github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto", } diff --git a/pkg/pb/contacts.pb.gorm.go b/pkg/pb/contacts.pb.gorm.go index 2ff6241..23eba3b 100644 --- a/pkg/pb/contacts.pb.gorm.go +++ b/pkg/pb/contacts.pb.gorm.go @@ -1,11 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pkg/pb/contacts.proto +// source: github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto + +// Generated with protoc-gen-gorm version: master +// Anticipating compatibility with atlas-app-toolkit version: master /* Package pb is a generated protocol buffer package. It is generated from these files: - pkg/pb/contacts.proto + github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto It has these top-level messages: Profile @@ -49,11 +52,12 @@ It has these top-level messages: package pb import context "context" -import errors "errors" +import fmt "fmt" +import strings "strings" import auth1 "github.com/infobloxopen/atlas-app-toolkit/auth" +import errors1 "github.com/infobloxopen/protoc-gen-gorm/errors" import field_mask1 "google.golang.org/genproto/protobuf/field_mask" -import gateway1 "github.com/infobloxopen/atlas-app-toolkit/gateway" import gorm1 "github.com/jinzhu/gorm" import gorm2 "github.com/infobloxopen/atlas-app-toolkit/gorm" import postgres1 "github.com/jinzhu/gorm/dialects/postgres" @@ -61,7 +65,6 @@ import query1 "github.com/infobloxopen/atlas-app-toolkit/query" import resource1 "github.com/infobloxopen/atlas-app-toolkit/gorm/resource" import types1 "github.com/infobloxopen/protoc-gen-gorm/types" -import fmt "fmt" import math "math" import _ "google.golang.org/genproto/protobuf/field_mask" import _ "google.golang.org/genproto/googleapis/api/annotations" @@ -686,80 +689,160 @@ type AddressWithAfterToPB interface { // DefaultCreateProfile executes a basic gorm create call func DefaultCreateProfile(ctx context.Context, in *Profile, db *gorm1.DB) (*Profile, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultCreateProfile") + return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(ProfileORMWithBeforeCreate_); ok { + if db, err = hook.BeforeCreate_(ctx, db); err != nil { + return nil, err + } + } if err = db.Create(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(ProfileORMWithAfterCreate_); ok { + if err = hook.AfterCreate_(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) return &pbResponse, err } +type ProfileORMWithBeforeCreate_ interface { + BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileORMWithAfterCreate_ interface { + AfterCreate_(context.Context, *gorm1.DB) error +} + // DefaultReadProfile executes a basic gorm read call func DefaultReadProfile(ctx context.Context, in *Profile, db *gorm1.DB) (*Profile, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultReadProfile") + return nil, errors1.NilArgumentError } - db = db.Set("gorm:auto_preload", true) - ormParams, err := in.ToORM(ctx) + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if ormObj.Id == 0 { + return nil, errors1.EmptyIdError + } + if hook, ok := interface{}(&ormObj).(ProfileORMWithBeforeReadApplyQuery); ok { + if db, err = hook.BeforeReadApplyQuery(ctx, db); err != nil { + return nil, err + } + } + if db, err = gorm2.ApplyFieldSelection(ctx, db, nil, &ProfileORM{}); err != nil { + return nil, err + } + if hook, ok := interface{}(&ormObj).(ProfileORMWithBeforeReadFind); ok { + if db, err = hook.BeforeReadFind(ctx, db); err != nil { + return nil, err + } + } ormResponse := ProfileORM{} - if err = db.Where(&ormParams).First(&ormResponse).Error; err != nil { + if err = db.Where(&ormObj).First(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormResponse).(ProfileORMWithAfterReadFind); ok { + if err = hook.AfterReadFind(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormResponse.ToPB(ctx) return &pbResponse, err } -// DefaultUpdateProfile executes a basic gorm update call -func DefaultUpdateProfile(ctx context.Context, in *Profile, db *gorm1.DB) (*Profile, error) { +type ProfileORMWithBeforeReadApplyQuery interface { + BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileORMWithBeforeReadFind interface { + BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileORMWithAfterReadFind interface { + AfterReadFind(context.Context, *gorm1.DB) error +} + +func DefaultDeleteProfile(ctx context.Context, in *Profile, db *gorm1.DB) error { if in == nil { - return nil, errors.New("Nil argument to DefaultUpdateProfile") + return errors1.NilArgumentError } - accountID, err := auth1.GetAccountID(ctx, nil) + ormObj, err := in.ToORM(ctx) if err != nil { - return nil, err + return err } - if exists, err := DefaultReadProfile(ctx, &Profile{Id: in.GetId()}, db); err != nil { - return nil, err - } else if exists == nil { - return nil, errors.New("Profile not found") + if ormObj.Id == 0 { + return errors1.EmptyIdError } - ormObj, err := in.ToORM(ctx) + if hook, ok := interface{}(&ormObj).(ProfileORMWithBeforeDelete_); ok { + if db, err = hook.BeforeDelete_(ctx, db); err != nil { + return err + } + } + err = db.Where(&ormObj).Delete(&ProfileORM{}).Error if err != nil { - return nil, err + return err } - ormObj.AccountID = accountID - db = db.Where(&ProfileORM{AccountID: accountID}) - if err = db.Save(&ormObj).Error; err != nil { - return nil, err + if hook, ok := interface{}(&ormObj).(ProfileORMWithAfterDelete_); ok { + err = hook.AfterDelete_(ctx, db) } - pbResponse, err := ormObj.ToPB(ctx) - return &pbResponse, err + return err } -func DefaultDeleteProfile(ctx context.Context, in *Profile, db *gorm1.DB) error { +type ProfileORMWithBeforeDelete_ interface { + BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileORMWithAfterDelete_ interface { + AfterDelete_(context.Context, *gorm1.DB) error +} + +func DefaultDeleteProfileSet(ctx context.Context, in []*Profile, db *gorm1.DB) error { if in == nil { - return errors.New("Nil argument to DefaultDeleteProfile") + return errors1.NilArgumentError } - ormObj, err := in.ToORM(ctx) + var err error + keys := []int64{} + for _, obj := range in { + ormObj, err := obj.ToORM(ctx) + if err != nil { + return err + } + if ormObj.Id == 0 { + return errors1.EmptyIdError + } + keys = append(keys, ormObj.Id) + } + if hook, ok := (interface{}(&ProfileORM{})).(ProfileORMWithBeforeDeleteSet); ok { + if db, err = hook.BeforeDeleteSet(ctx, in, db); err != nil { + return err + } + } + acctId, err := auth1.GetAccountID(ctx, nil) if err != nil { return err } - if ormObj.Id == 0 { - return errors.New("A non-zero ID value is required for a delete call") + err = db.Where("account_id = ? AND id in (?)", acctId, keys).Delete(&ProfileORM{}).Error + if err != nil { + return err + } + if hook, ok := (interface{}(&ProfileORM{})).(ProfileORMWithAfterDeleteSet); ok { + err = hook.AfterDeleteSet(ctx, in, db) } - err = db.Where(&ormObj).Delete(&ProfileORM{}).Error return err } -// DefaultStrictUpdateProfile clears first level 1:many children and then executes a gorm update call +type ProfileORMWithBeforeDeleteSet interface { + BeforeDeleteSet(context.Context, []*Profile, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileORMWithAfterDeleteSet interface { + AfterDeleteSet(context.Context, []*Profile, *gorm1.DB) error +} + +// DefaultStrictUpdateProfile clears / replaces / appends first level 1:many children and then executes a gorm update call func DefaultStrictUpdateProfile(ctx context.Context, in *Profile, db *gorm1.DB) (*Profile, error) { if in == nil { return nil, fmt.Errorf("Nil argument to DefaultStrictUpdateProfile") @@ -768,128 +851,168 @@ func DefaultStrictUpdateProfile(ctx context.Context, in *Profile, db *gorm1.DB) if err != nil { return nil, err } - count := 1 - err = db.Model(&ormObj).Where("id=?", ormObj.Id).Count(&count).Error + accountID, err := auth1.GetAccountID(ctx, nil) if err != nil { return nil, err } + db = db.Where(map[string]interface{}{"account_id": accountID}) + lockedRow := &ProfileORM{} + db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + if hook, ok := interface{}(&ormObj).(ProfileORMWithBeforeStrictUpdateCleanup); ok { + if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { + return nil, err + } + } filterContacts := ContactORM{} if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ProfileORM") + return nil, errors1.EmptyIdError } filterContacts.ProfileId = new(int64) *filterContacts.ProfileId = ormObj.Id - filterContacts.AccountID = ormObj.AccountID if err = db.Where(filterContacts).Delete(ContactORM{}).Error; err != nil { return nil, err } filterGroups := GroupORM{} if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ProfileORM") + return nil, errors1.EmptyIdError } filterGroups.ProfileId = new(int64) *filterGroups.ProfileId = ormObj.Id - filterGroups.AccountID = ormObj.AccountID if err = db.Where(filterGroups).Delete(GroupORM{}).Error; err != nil { return nil, err } - db = db.Where(&ProfileORM{AccountID: ormObj.AccountID}) + if hook, ok := interface{}(&ormObj).(ProfileORMWithBeforeStrictUpdateSave); ok { + if db, err = hook.BeforeStrictUpdateSave(ctx, db); err != nil { + return nil, err + } + } if err = db.Save(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(ProfileORMWithAfterStrictUpdateSave); ok { + if err = hook.AfterStrictUpdateSave(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) if err != nil { return nil, err } - if count == 0 { - err = gateway1.SetCreated(ctx, "") - } return &pbResponse, err } +type ProfileORMWithBeforeStrictUpdateCleanup interface { + BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileORMWithBeforeStrictUpdateSave interface { + BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileORMWithAfterStrictUpdateSave interface { + AfterStrictUpdateSave(context.Context, *gorm1.DB) error +} + // DefaultPatchProfile executes a basic gorm update call with patch behavior func DefaultPatchProfile(ctx context.Context, in *Profile, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Profile, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultPatchProfile") + return nil, errors1.NilArgumentError } - accountID, err := auth1.GetAccountID(ctx, nil) - if err != nil { - return nil, err + var pbObj Profile + var err error + if hook, ok := interface{}(&pbObj).(ProfileWithBeforePatchRead); ok { + if db, err = hook.BeforePatchRead(ctx, in, updateMask, db); err != nil { + return nil, err + } } pbReadRes, err := DefaultReadProfile(ctx, &Profile{Id: in.GetId()}, db) if err != nil { return nil, err } - pbObj := *pbReadRes - ormObj, err := pbObj.ToORM(ctx) - if err != nil { - return nil, err + pbObj = *pbReadRes + if hook, ok := interface{}(&pbObj).(ProfileWithBeforePatchApplyFieldMask); ok { + if db, err = hook.BeforePatchApplyFieldMask(ctx, in, updateMask, db); err != nil { + return nil, err + } } - if _, err := DefaultApplyFieldMaskProfile(ctx, &pbObj, &ormObj, in, updateMask, db); err != nil { + if _, err := DefaultApplyFieldMaskProfile(ctx, &pbObj, in, updateMask, "", db); err != nil { return nil, err } if hook, ok := interface{}(&pbObj).(ProfileWithBeforePatchSave); ok { - if ctx, db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { + if db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { return nil, err } } - ormObj, err = pbObj.ToORM(ctx) + pbResponse, err := DefaultStrictUpdateProfile(ctx, &pbObj, db) if err != nil { return nil, err } - db = db.Where(&ProfileORM{AccountID: accountID}) - if err = db.Save(&ormObj).Error; err != nil { - return nil, err - } - pbObj, err = ormObj.ToPB(ctx) - if err != nil { - return nil, err + if hook, ok := interface{}(pbResponse).(ProfileWithAfterPatchSave); ok { + if err = hook.AfterPatchSave(ctx, in, updateMask, db); err != nil { + return nil, err + } } - return &pbObj, err + return pbResponse, nil } +type ProfileWithBeforePatchRead interface { + BeforePatchRead(context.Context, *Profile, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileWithBeforePatchApplyFieldMask interface { + BeforePatchApplyFieldMask(context.Context, *Profile, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} type ProfileWithBeforePatchSave interface { - BeforePatchSave(context.Context, *Profile, *field_mask1.FieldMask, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforePatchSave(context.Context, *Profile, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} +type ProfileWithAfterPatchSave interface { + AfterPatchSave(context.Context, *Profile, *field_mask1.FieldMask, *gorm1.DB) error +} + +// DefaultPatchSetProfile executes a bulk gorm update call with patch behavior +func DefaultPatchSetProfile(ctx context.Context, objects []*Profile, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*Profile, error) { + if len(objects) != len(updateMasks) { + return nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(updateMasks), len(objects)) + } + + results := make([]*Profile, 0, len(objects)) + for i, patcher := range objects { + pbResponse, err := DefaultPatchProfile(ctx, patcher, updateMasks[i], db) + if err != nil { + return nil, err + } + + results = append(results, pbResponse) + } + + return results, nil } // DefaultApplyFieldMaskProfile patches an pbObject with patcher according to a field mask. -func DefaultApplyFieldMaskProfile(ctx context.Context, patchee *Profile, ormObj *ProfileORM, patcher *Profile, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Profile, error) { +func DefaultApplyFieldMaskProfile(ctx context.Context, patchee *Profile, patcher *Profile, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Profile, error) { + if patcher == nil { + return nil, nil + } else if patchee == nil { + return nil, errors1.NilArgumentError + } var err error - for _, f := range updateMask.GetPaths() { - if f == "Id" { + for _, f := range updateMask.Paths { + if f == prefix+"Id" { patchee.Id = patcher.Id + continue } - if f == "Name" { + if f == prefix+"Name" { patchee.Name = patcher.Name + continue } - if f == "Notes" { + if f == prefix+"Notes" { patchee.Notes = patcher.Notes + continue } - if f == "Contacts" { + if f == prefix+"Contacts" { patchee.Contacts = patcher.Contacts - filterContacts := ContactORM{} - if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ProfileORM") - } - filterContacts.ProfileId = new(int64) - *filterContacts.ProfileId = ormObj.Id - filterContacts.AccountID = ormObj.AccountID - if err = db.Where(filterContacts).Delete(ContactORM{}).Error; err != nil { - return nil, err - } + continue } - if f == "Groups" { + if f == prefix+"Groups" { patchee.Groups = patcher.Groups - filterGroups := GroupORM{} - if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ProfileORM") - } - filterGroups.ProfileId = new(int64) - *filterGroups.ProfileId = ormObj.Id - filterGroups.AccountID = ormObj.AccountID - if err = db.Where(filterGroups).Delete(GroupORM{}).Error; err != nil { - return nil, err - } + continue } } if err != nil { @@ -898,55 +1021,38 @@ func DefaultApplyFieldMaskProfile(ctx context.Context, patchee *Profile, ormObj return patchee, nil } -// getCollectionOperators takes collection operator values from corresponding message fields -func getCollectionOperators(in interface{}) (*query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection, error) { - f := &query1.Filtering{} - err := gateway1.GetCollectionOp(in, f) - if err != nil { - return nil, nil, nil, nil, err - } - s := &query1.Sorting{} - err = gateway1.GetCollectionOp(in, s) - if err != nil { - return nil, nil, nil, nil, err - } - p := &query1.Pagination{} - err = gateway1.GetCollectionOp(in, p) - if err != nil { - return nil, nil, nil, nil, err - } - fs := &query1.FieldSelection{} - err = gateway1.GetCollectionOp(in, fs) - if err != nil { - return nil, nil, nil, nil, err - } - return f, s, p, fs, nil -} - // DefaultListProfile executes a gorm list call -func DefaultListProfile(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Profile, error) { - ormResponse := []ProfileORM{} - f, s, p, fs, err := getCollectionOperators(req) - if err != nil { - return nil, err - } - db, err = gorm2.ApplyCollectionOperators(db, &ProfileORM{}, f, s, p, fs) +func DefaultListProfile(ctx context.Context, db *gorm1.DB, f *query1.Filtering, s *query1.Sorting, p *query1.Pagination, fs *query1.FieldSelection) ([]*Profile, error) { + in := Profile{} + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } - if fs.GetFields() == nil { - db = db.Set("gorm:auto_preload", true) + if hook, ok := interface{}(&ormObj).(ProfileORMWithBeforeListApplyQuery); ok { + if db, err = hook.BeforeListApplyQuery(ctx, db, f, s, p, fs); err != nil { + return nil, err + } } - in := Profile{} - ormParams, err := in.ToORM(ctx) + db, err = gorm2.ApplyCollectionOperators(ctx, db, &ProfileORM{}, &Profile{}, f, s, p, fs) if err != nil { return nil, err } - db = db.Where(&ormParams) + if hook, ok := interface{}(&ormObj).(ProfileORMWithBeforeListFind); ok { + if db, err = hook.BeforeListFind(ctx, db, f, s, p, fs); err != nil { + return nil, err + } + } + db = db.Where(&ormObj) db = db.Order("id") + ormResponse := []ProfileORM{} if err := db.Find(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(ProfileORMWithAfterListFind); ok { + if err = hook.AfterListFind(ctx, db, &ormResponse, f, s, p, fs); err != nil { + return nil, err + } + } pbResponse := []*Profile{} for _, responseEntry := range ormResponse { temp, err := responseEntry.ToPB(ctx) @@ -958,83 +1064,173 @@ func DefaultListProfile(ctx context.Context, db *gorm1.DB, req interface{}) ([]* return pbResponse, nil } +type ProfileORMWithBeforeListApplyQuery interface { + BeforeListApplyQuery(context.Context, *gorm1.DB, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) (*gorm1.DB, error) +} +type ProfileORMWithBeforeListFind interface { + BeforeListFind(context.Context, *gorm1.DB, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) (*gorm1.DB, error) +} +type ProfileORMWithAfterListFind interface { + AfterListFind(context.Context, *gorm1.DB, *[]ProfileORM, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) error +} + // DefaultCreateGroup executes a basic gorm create call func DefaultCreateGroup(ctx context.Context, in *Group, db *gorm1.DB) (*Group, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultCreateGroup") + return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(GroupORMWithBeforeCreate_); ok { + if db, err = hook.BeforeCreate_(ctx, db); err != nil { + return nil, err + } + } if err = db.Create(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(GroupORMWithAfterCreate_); ok { + if err = hook.AfterCreate_(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) return &pbResponse, err } +type GroupORMWithBeforeCreate_ interface { + BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type GroupORMWithAfterCreate_ interface { + AfterCreate_(context.Context, *gorm1.DB) error +} + // DefaultReadGroup executes a basic gorm read call func DefaultReadGroup(ctx context.Context, in *Group, db *gorm1.DB) (*Group, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultReadGroup") + return nil, errors1.NilArgumentError } - db = db.Set("gorm:auto_preload", true) - ormParams, err := in.ToORM(ctx) + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if ormObj.Id == 0 { + return nil, errors1.EmptyIdError + } + if hook, ok := interface{}(&ormObj).(GroupORMWithBeforeReadApplyQuery); ok { + if db, err = hook.BeforeReadApplyQuery(ctx, db); err != nil { + return nil, err + } + } + if db, err = gorm2.ApplyFieldSelection(ctx, db, nil, &GroupORM{}); err != nil { + return nil, err + } + if hook, ok := interface{}(&ormObj).(GroupORMWithBeforeReadFind); ok { + if db, err = hook.BeforeReadFind(ctx, db); err != nil { + return nil, err + } + } ormResponse := GroupORM{} - if err = db.Where(&ormParams).First(&ormResponse).Error; err != nil { + if err = db.Where(&ormObj).First(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormResponse).(GroupORMWithAfterReadFind); ok { + if err = hook.AfterReadFind(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormResponse.ToPB(ctx) return &pbResponse, err } -// DefaultUpdateGroup executes a basic gorm update call -func DefaultUpdateGroup(ctx context.Context, in *Group, db *gorm1.DB) (*Group, error) { +type GroupORMWithBeforeReadApplyQuery interface { + BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type GroupORMWithBeforeReadFind interface { + BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type GroupORMWithAfterReadFind interface { + AfterReadFind(context.Context, *gorm1.DB) error +} + +func DefaultDeleteGroup(ctx context.Context, in *Group, db *gorm1.DB) error { if in == nil { - return nil, errors.New("Nil argument to DefaultUpdateGroup") + return errors1.NilArgumentError } - accountID, err := auth1.GetAccountID(ctx, nil) + ormObj, err := in.ToORM(ctx) if err != nil { - return nil, err + return err } - if exists, err := DefaultReadGroup(ctx, &Group{Id: in.GetId()}, db); err != nil { - return nil, err - } else if exists == nil { - return nil, errors.New("Group not found") + if ormObj.Id == 0 { + return errors1.EmptyIdError } - ormObj, err := in.ToORM(ctx) + if hook, ok := interface{}(&ormObj).(GroupORMWithBeforeDelete_); ok { + if db, err = hook.BeforeDelete_(ctx, db); err != nil { + return err + } + } + err = db.Where(&ormObj).Delete(&GroupORM{}).Error if err != nil { - return nil, err + return err } - ormObj.AccountID = accountID - db = db.Where(&GroupORM{AccountID: accountID}) - if err = db.Save(&ormObj).Error; err != nil { - return nil, err + if hook, ok := interface{}(&ormObj).(GroupORMWithAfterDelete_); ok { + err = hook.AfterDelete_(ctx, db) } - pbResponse, err := ormObj.ToPB(ctx) - return &pbResponse, err + return err } -func DefaultDeleteGroup(ctx context.Context, in *Group, db *gorm1.DB) error { +type GroupORMWithBeforeDelete_ interface { + BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type GroupORMWithAfterDelete_ interface { + AfterDelete_(context.Context, *gorm1.DB) error +} + +func DefaultDeleteGroupSet(ctx context.Context, in []*Group, db *gorm1.DB) error { if in == nil { - return errors.New("Nil argument to DefaultDeleteGroup") + return errors1.NilArgumentError } - ormObj, err := in.ToORM(ctx) + var err error + keys := []int64{} + for _, obj := range in { + ormObj, err := obj.ToORM(ctx) + if err != nil { + return err + } + if ormObj.Id == 0 { + return errors1.EmptyIdError + } + keys = append(keys, ormObj.Id) + } + if hook, ok := (interface{}(&GroupORM{})).(GroupORMWithBeforeDeleteSet); ok { + if db, err = hook.BeforeDeleteSet(ctx, in, db); err != nil { + return err + } + } + acctId, err := auth1.GetAccountID(ctx, nil) if err != nil { return err } - if ormObj.Id == 0 { - return errors.New("A non-zero ID value is required for a delete call") + err = db.Where("account_id = ? AND id in (?)", acctId, keys).Delete(&GroupORM{}).Error + if err != nil { + return err + } + if hook, ok := (interface{}(&GroupORM{})).(GroupORMWithAfterDeleteSet); ok { + err = hook.AfterDeleteSet(ctx, in, db) } - err = db.Where(&ormObj).Delete(&GroupORM{}).Error return err } -// DefaultStrictUpdateGroup clears first level 1:many children and then executes a gorm update call +type GroupORMWithBeforeDeleteSet interface { + BeforeDeleteSet(context.Context, []*Group, *gorm1.DB) (*gorm1.DB, error) +} +type GroupORMWithAfterDeleteSet interface { + AfterDeleteSet(context.Context, []*Group, *gorm1.DB) error +} + +// DefaultStrictUpdateGroup clears / replaces / appends first level 1:many children and then executes a gorm update call func DefaultStrictUpdateGroup(ctx context.Context, in *Group, db *gorm1.DB) (*Group, error) { if in == nil { return nil, fmt.Errorf("Nil argument to DefaultStrictUpdateGroup") @@ -1043,88 +1239,154 @@ func DefaultStrictUpdateGroup(ctx context.Context, in *Group, db *gorm1.DB) (*Gr if err != nil { return nil, err } - count := 1 - err = db.Model(&ormObj).Where("id=?", ormObj.Id).Count(&count).Error + accountID, err := auth1.GetAccountID(ctx, nil) if err != nil { return nil, err } - db = db.Where(&GroupORM{AccountID: ormObj.AccountID}) + db = db.Where(map[string]interface{}{"account_id": accountID}) + lockedRow := &GroupORM{} + db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + if hook, ok := interface{}(&ormObj).(GroupORMWithBeforeStrictUpdateCleanup); ok { + if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { + return nil, err + } + } + if err = db.Model(&ormObj).Association("Contacts").Replace(ormObj.Contacts).Error; err != nil { + return nil, err + } + ormObj.Contacts = nil + if hook, ok := interface{}(&ormObj).(GroupORMWithBeforeStrictUpdateSave); ok { + if db, err = hook.BeforeStrictUpdateSave(ctx, db); err != nil { + return nil, err + } + } if err = db.Save(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(GroupORMWithAfterStrictUpdateSave); ok { + if err = hook.AfterStrictUpdateSave(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) if err != nil { return nil, err } - if count == 0 { - err = gateway1.SetCreated(ctx, "") - } return &pbResponse, err } +type GroupORMWithBeforeStrictUpdateCleanup interface { + BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type GroupORMWithBeforeStrictUpdateSave interface { + BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type GroupORMWithAfterStrictUpdateSave interface { + AfterStrictUpdateSave(context.Context, *gorm1.DB) error +} + // DefaultPatchGroup executes a basic gorm update call with patch behavior func DefaultPatchGroup(ctx context.Context, in *Group, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Group, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultPatchGroup") + return nil, errors1.NilArgumentError } - accountID, err := auth1.GetAccountID(ctx, nil) - if err != nil { - return nil, err + var pbObj Group + var err error + if hook, ok := interface{}(&pbObj).(GroupWithBeforePatchRead); ok { + if db, err = hook.BeforePatchRead(ctx, in, updateMask, db); err != nil { + return nil, err + } } pbReadRes, err := DefaultReadGroup(ctx, &Group{Id: in.GetId()}, db) if err != nil { return nil, err } - pbObj := *pbReadRes - ormObj, err := pbObj.ToORM(ctx) - if err != nil { - return nil, err + pbObj = *pbReadRes + if hook, ok := interface{}(&pbObj).(GroupWithBeforePatchApplyFieldMask); ok { + if db, err = hook.BeforePatchApplyFieldMask(ctx, in, updateMask, db); err != nil { + return nil, err + } } - if _, err := DefaultApplyFieldMaskGroup(ctx, &pbObj, &ormObj, in, updateMask, db); err != nil { + if _, err := DefaultApplyFieldMaskGroup(ctx, &pbObj, in, updateMask, "", db); err != nil { return nil, err } if hook, ok := interface{}(&pbObj).(GroupWithBeforePatchSave); ok { - if ctx, db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { + if db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { return nil, err } } - ormObj, err = pbObj.ToORM(ctx) + pbResponse, err := DefaultStrictUpdateGroup(ctx, &pbObj, db) if err != nil { return nil, err } - db = db.Where(&GroupORM{AccountID: accountID}) - if err = db.Save(&ormObj).Error; err != nil { - return nil, err - } - pbObj, err = ormObj.ToPB(ctx) - if err != nil { - return nil, err + if hook, ok := interface{}(pbResponse).(GroupWithAfterPatchSave); ok { + if err = hook.AfterPatchSave(ctx, in, updateMask, db); err != nil { + return nil, err + } } - return &pbObj, err + return pbResponse, nil } +type GroupWithBeforePatchRead interface { + BeforePatchRead(context.Context, *Group, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} +type GroupWithBeforePatchApplyFieldMask interface { + BeforePatchApplyFieldMask(context.Context, *Group, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} type GroupWithBeforePatchSave interface { - BeforePatchSave(context.Context, *Group, *field_mask1.FieldMask, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforePatchSave(context.Context, *Group, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} +type GroupWithAfterPatchSave interface { + AfterPatchSave(context.Context, *Group, *field_mask1.FieldMask, *gorm1.DB) error } -// DefaultApplyFieldMaskGroup patches an pbObject with patcher according to a field mask. -func DefaultApplyFieldMaskGroup(ctx context.Context, patchee *Group, ormObj *GroupORM, patcher *Group, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Group, error) { - var err error - for _, f := range updateMask.GetPaths() { - if f == "Id" { +// DefaultPatchSetGroup executes a bulk gorm update call with patch behavior +func DefaultPatchSetGroup(ctx context.Context, objects []*Group, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*Group, error) { + if len(objects) != len(updateMasks) { + return nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(updateMasks), len(objects)) + } + + results := make([]*Group, 0, len(objects)) + for i, patcher := range objects { + pbResponse, err := DefaultPatchGroup(ctx, patcher, updateMasks[i], db) + if err != nil { + return nil, err + } + + results = append(results, pbResponse) + } + + return results, nil +} + +// DefaultApplyFieldMaskGroup patches an pbObject with patcher according to a field mask. +func DefaultApplyFieldMaskGroup(ctx context.Context, patchee *Group, patcher *Group, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Group, error) { + if patcher == nil { + return nil, nil + } else if patchee == nil { + return nil, errors1.NilArgumentError + } + var err error + for _, f := range updateMask.Paths { + if f == prefix+"Id" { patchee.Id = patcher.Id + continue } - if f == "Name" { + if f == prefix+"Name" { patchee.Name = patcher.Name + continue } - if f == "Notes" { + if f == prefix+"Notes" { patchee.Notes = patcher.Notes + continue } - if f == "ProfileId" { + if f == prefix+"ProfileId" { patchee.ProfileId = patcher.ProfileId + continue } - if f == "Contacts" { + if f == prefix+"Contacts" { patchee.Contacts = patcher.Contacts + continue } } if err != nil { @@ -1134,29 +1396,37 @@ func DefaultApplyFieldMaskGroup(ctx context.Context, patchee *Group, ormObj *Gro } // DefaultListGroup executes a gorm list call -func DefaultListGroup(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Group, error) { - ormResponse := []GroupORM{} - f, s, p, fs, err := getCollectionOperators(req) - if err != nil { - return nil, err - } - db, err = gorm2.ApplyCollectionOperators(db, &GroupORM{}, f, s, p, fs) +func DefaultListGroup(ctx context.Context, db *gorm1.DB, f *query1.Filtering, s *query1.Sorting, p *query1.Pagination, fs *query1.FieldSelection) ([]*Group, error) { + in := Group{} + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } - if fs.GetFields() == nil { - db = db.Set("gorm:auto_preload", true) + if hook, ok := interface{}(&ormObj).(GroupORMWithBeforeListApplyQuery); ok { + if db, err = hook.BeforeListApplyQuery(ctx, db, f, s, p, fs); err != nil { + return nil, err + } } - in := Group{} - ormParams, err := in.ToORM(ctx) + db, err = gorm2.ApplyCollectionOperators(ctx, db, &GroupORM{}, &Group{}, f, s, p, fs) if err != nil { return nil, err } - db = db.Where(&ormParams) + if hook, ok := interface{}(&ormObj).(GroupORMWithBeforeListFind); ok { + if db, err = hook.BeforeListFind(ctx, db, f, s, p, fs); err != nil { + return nil, err + } + } + db = db.Where(&ormObj) db = db.Order("id") + ormResponse := []GroupORM{} if err := db.Find(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(GroupORMWithAfterListFind); ok { + if err = hook.AfterListFind(ctx, db, &ormResponse, f, s, p, fs); err != nil { + return nil, err + } + } pbResponse := []*Group{} for _, responseEntry := range ormResponse { temp, err := responseEntry.ToPB(ctx) @@ -1168,83 +1438,173 @@ func DefaultListGroup(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Gr return pbResponse, nil } +type GroupORMWithBeforeListApplyQuery interface { + BeforeListApplyQuery(context.Context, *gorm1.DB, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) (*gorm1.DB, error) +} +type GroupORMWithBeforeListFind interface { + BeforeListFind(context.Context, *gorm1.DB, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) (*gorm1.DB, error) +} +type GroupORMWithAfterListFind interface { + AfterListFind(context.Context, *gorm1.DB, *[]GroupORM, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) error +} + // DefaultCreateContact executes a basic gorm create call func DefaultCreateContact(ctx context.Context, in *Contact, db *gorm1.DB) (*Contact, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultCreateContact") + return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(ContactORMWithBeforeCreate_); ok { + if db, err = hook.BeforeCreate_(ctx, db); err != nil { + return nil, err + } + } if err = db.Create(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(ContactORMWithAfterCreate_); ok { + if err = hook.AfterCreate_(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) return &pbResponse, err } +type ContactORMWithBeforeCreate_ interface { + BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ContactORMWithAfterCreate_ interface { + AfterCreate_(context.Context, *gorm1.DB) error +} + // DefaultReadContact executes a basic gorm read call func DefaultReadContact(ctx context.Context, in *Contact, db *gorm1.DB) (*Contact, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultReadContact") + return nil, errors1.NilArgumentError } - db = db.Set("gorm:auto_preload", true) - ormParams, err := in.ToORM(ctx) + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if ormObj.Id == 0 { + return nil, errors1.EmptyIdError + } + if hook, ok := interface{}(&ormObj).(ContactORMWithBeforeReadApplyQuery); ok { + if db, err = hook.BeforeReadApplyQuery(ctx, db); err != nil { + return nil, err + } + } + if db, err = gorm2.ApplyFieldSelection(ctx, db, nil, &ContactORM{}); err != nil { + return nil, err + } + if hook, ok := interface{}(&ormObj).(ContactORMWithBeforeReadFind); ok { + if db, err = hook.BeforeReadFind(ctx, db); err != nil { + return nil, err + } + } ormResponse := ContactORM{} - if err = db.Where(&ormParams).First(&ormResponse).Error; err != nil { + if err = db.Where(&ormObj).First(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormResponse).(ContactORMWithAfterReadFind); ok { + if err = hook.AfterReadFind(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormResponse.ToPB(ctx) return &pbResponse, err } -// DefaultUpdateContact executes a basic gorm update call -func DefaultUpdateContact(ctx context.Context, in *Contact, db *gorm1.DB) (*Contact, error) { +type ContactORMWithBeforeReadApplyQuery interface { + BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ContactORMWithBeforeReadFind interface { + BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ContactORMWithAfterReadFind interface { + AfterReadFind(context.Context, *gorm1.DB) error +} + +func DefaultDeleteContact(ctx context.Context, in *Contact, db *gorm1.DB) error { if in == nil { - return nil, errors.New("Nil argument to DefaultUpdateContact") + return errors1.NilArgumentError } - accountID, err := auth1.GetAccountID(ctx, nil) + ormObj, err := in.ToORM(ctx) if err != nil { - return nil, err + return err } - if exists, err := DefaultReadContact(ctx, &Contact{Id: in.GetId()}, db); err != nil { - return nil, err - } else if exists == nil { - return nil, errors.New("Contact not found") + if ormObj.Id == 0 { + return errors1.EmptyIdError } - ormObj, err := in.ToORM(ctx) + if hook, ok := interface{}(&ormObj).(ContactORMWithBeforeDelete_); ok { + if db, err = hook.BeforeDelete_(ctx, db); err != nil { + return err + } + } + err = db.Where(&ormObj).Delete(&ContactORM{}).Error if err != nil { - return nil, err + return err } - ormObj.AccountID = accountID - db = db.Where(&ContactORM{AccountID: accountID}) - if err = db.Save(&ormObj).Error; err != nil { - return nil, err + if hook, ok := interface{}(&ormObj).(ContactORMWithAfterDelete_); ok { + err = hook.AfterDelete_(ctx, db) } - pbResponse, err := ormObj.ToPB(ctx) - return &pbResponse, err + return err } -func DefaultDeleteContact(ctx context.Context, in *Contact, db *gorm1.DB) error { +type ContactORMWithBeforeDelete_ interface { + BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ContactORMWithAfterDelete_ interface { + AfterDelete_(context.Context, *gorm1.DB) error +} + +func DefaultDeleteContactSet(ctx context.Context, in []*Contact, db *gorm1.DB) error { if in == nil { - return errors.New("Nil argument to DefaultDeleteContact") + return errors1.NilArgumentError } - ormObj, err := in.ToORM(ctx) + var err error + keys := []int64{} + for _, obj := range in { + ormObj, err := obj.ToORM(ctx) + if err != nil { + return err + } + if ormObj.Id == 0 { + return errors1.EmptyIdError + } + keys = append(keys, ormObj.Id) + } + if hook, ok := (interface{}(&ContactORM{})).(ContactORMWithBeforeDeleteSet); ok { + if db, err = hook.BeforeDeleteSet(ctx, in, db); err != nil { + return err + } + } + acctId, err := auth1.GetAccountID(ctx, nil) if err != nil { return err } - if ormObj.Id == 0 { - return errors.New("A non-zero ID value is required for a delete call") + err = db.Where("account_id = ? AND id in (?)", acctId, keys).Delete(&ContactORM{}).Error + if err != nil { + return err + } + if hook, ok := (interface{}(&ContactORM{})).(ContactORMWithAfterDeleteSet); ok { + err = hook.AfterDeleteSet(ctx, in, db) } - err = db.Where(&ormObj).Delete(&ContactORM{}).Error return err } -// DefaultStrictUpdateContact clears first level 1:many children and then executes a gorm update call +type ContactORMWithBeforeDeleteSet interface { + BeforeDeleteSet(context.Context, []*Contact, *gorm1.DB) (*gorm1.DB, error) +} +type ContactORMWithAfterDeleteSet interface { + AfterDeleteSet(context.Context, []*Contact, *gorm1.DB) error +} + +// DefaultStrictUpdateContact clears / replaces / appends first level 1:many children and then executes a gorm update call func DefaultStrictUpdateContact(ctx context.Context, in *Contact, db *gorm1.DB) (*Contact, error) { if in == nil { return nil, fmt.Errorf("Nil argument to DefaultStrictUpdateContact") @@ -1253,169 +1613,247 @@ func DefaultStrictUpdateContact(ctx context.Context, in *Contact, db *gorm1.DB) if err != nil { return nil, err } - count := 1 - err = db.Model(&ormObj).Where("id=?", ormObj.Id).Count(&count).Error + accountID, err := auth1.GetAccountID(ctx, nil) if err != nil { return nil, err } + db = db.Where(map[string]interface{}{"account_id": accountID}) + lockedRow := &ContactORM{} + db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + if hook, ok := interface{}(&ormObj).(ContactORMWithBeforeStrictUpdateCleanup); ok { + if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { + return nil, err + } + } filterEmails := EmailORM{} if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ContactORM") + return nil, errors1.EmptyIdError } filterEmails.ContactId = new(int64) *filterEmails.ContactId = ormObj.Id - filterEmails.AccountID = ormObj.AccountID if err = db.Where(filterEmails).Delete(EmailORM{}).Error; err != nil { return nil, err } + if err = db.Model(&ormObj).Association("Groups").Replace(ormObj.Groups).Error; err != nil { + return nil, err + } + ormObj.Groups = nil filterHomeAddress := AddressORM{} if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ContactORM") + return nil, errors1.EmptyIdError } filterHomeAddress.HomeAddressContactId = new(int64) *filterHomeAddress.HomeAddressContactId = ormObj.Id - filterHomeAddress.AccountID = ormObj.AccountID if err = db.Where(filterHomeAddress).Delete(AddressORM{}).Error; err != nil { return nil, err } filterWorkAddress := AddressORM{} if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ContactORM") + return nil, errors1.EmptyIdError } filterWorkAddress.WorkAddressContactId = new(int64) *filterWorkAddress.WorkAddressContactId = ormObj.Id - filterWorkAddress.AccountID = ormObj.AccountID if err = db.Where(filterWorkAddress).Delete(AddressORM{}).Error; err != nil { return nil, err } - db = db.Where(&ContactORM{AccountID: ormObj.AccountID}) + if hook, ok := interface{}(&ormObj).(ContactORMWithBeforeStrictUpdateSave); ok { + if db, err = hook.BeforeStrictUpdateSave(ctx, db); err != nil { + return nil, err + } + } if err = db.Save(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(ContactORMWithAfterStrictUpdateSave); ok { + if err = hook.AfterStrictUpdateSave(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) if err != nil { return nil, err } - if count == 0 { - err = gateway1.SetCreated(ctx, "") - } return &pbResponse, err } +type ContactORMWithBeforeStrictUpdateCleanup interface { + BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ContactORMWithBeforeStrictUpdateSave interface { + BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type ContactORMWithAfterStrictUpdateSave interface { + AfterStrictUpdateSave(context.Context, *gorm1.DB) error +} + // DefaultPatchContact executes a basic gorm update call with patch behavior func DefaultPatchContact(ctx context.Context, in *Contact, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Contact, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultPatchContact") + return nil, errors1.NilArgumentError } - accountID, err := auth1.GetAccountID(ctx, nil) - if err != nil { - return nil, err + var pbObj Contact + var err error + if hook, ok := interface{}(&pbObj).(ContactWithBeforePatchRead); ok { + if db, err = hook.BeforePatchRead(ctx, in, updateMask, db); err != nil { + return nil, err + } } pbReadRes, err := DefaultReadContact(ctx, &Contact{Id: in.GetId()}, db) if err != nil { return nil, err } - pbObj := *pbReadRes - ormObj, err := pbObj.ToORM(ctx) - if err != nil { - return nil, err + pbObj = *pbReadRes + if hook, ok := interface{}(&pbObj).(ContactWithBeforePatchApplyFieldMask); ok { + if db, err = hook.BeforePatchApplyFieldMask(ctx, in, updateMask, db); err != nil { + return nil, err + } } - if _, err := DefaultApplyFieldMaskContact(ctx, &pbObj, &ormObj, in, updateMask, db); err != nil { + if _, err := DefaultApplyFieldMaskContact(ctx, &pbObj, in, updateMask, "", db); err != nil { return nil, err } if hook, ok := interface{}(&pbObj).(ContactWithBeforePatchSave); ok { - if ctx, db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { + if db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { return nil, err } } - ormObj, err = pbObj.ToORM(ctx) + pbResponse, err := DefaultStrictUpdateContact(ctx, &pbObj, db) if err != nil { return nil, err } - db = db.Where(&ContactORM{AccountID: accountID}) - if err = db.Save(&ormObj).Error; err != nil { - return nil, err - } - pbObj, err = ormObj.ToPB(ctx) - if err != nil { - return nil, err + if hook, ok := interface{}(pbResponse).(ContactWithAfterPatchSave); ok { + if err = hook.AfterPatchSave(ctx, in, updateMask, db); err != nil { + return nil, err + } } - return &pbObj, err + return pbResponse, nil } +type ContactWithBeforePatchRead interface { + BeforePatchRead(context.Context, *Contact, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} +type ContactWithBeforePatchApplyFieldMask interface { + BeforePatchApplyFieldMask(context.Context, *Contact, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} type ContactWithBeforePatchSave interface { - BeforePatchSave(context.Context, *Contact, *field_mask1.FieldMask, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforePatchSave(context.Context, *Contact, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} +type ContactWithAfterPatchSave interface { + AfterPatchSave(context.Context, *Contact, *field_mask1.FieldMask, *gorm1.DB) error +} + +// DefaultPatchSetContact executes a bulk gorm update call with patch behavior +func DefaultPatchSetContact(ctx context.Context, objects []*Contact, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*Contact, error) { + if len(objects) != len(updateMasks) { + return nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(updateMasks), len(objects)) + } + + results := make([]*Contact, 0, len(objects)) + for i, patcher := range objects { + pbResponse, err := DefaultPatchContact(ctx, patcher, updateMasks[i], db) + if err != nil { + return nil, err + } + + results = append(results, pbResponse) + } + + return results, nil } // DefaultApplyFieldMaskContact patches an pbObject with patcher according to a field mask. -func DefaultApplyFieldMaskContact(ctx context.Context, patchee *Contact, ormObj *ContactORM, patcher *Contact, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Contact, error) { +func DefaultApplyFieldMaskContact(ctx context.Context, patchee *Contact, patcher *Contact, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Contact, error) { + if patcher == nil { + return nil, nil + } else if patchee == nil { + return nil, errors1.NilArgumentError + } var err error - for _, f := range updateMask.GetPaths() { - if f == "Id" { + var updatedHomeAddress bool + var updatedWorkAddress bool + var updatedNicknames bool + for i, f := range updateMask.Paths { + if f == prefix+"Id" { patchee.Id = patcher.Id + continue } - if f == "FirstName" { + if f == prefix+"FirstName" { patchee.FirstName = patcher.FirstName + continue } - if f == "MiddleName" { + if f == prefix+"MiddleName" { patchee.MiddleName = patcher.MiddleName + continue } - if f == "LastName" { + if f == prefix+"LastName" { patchee.LastName = patcher.LastName + continue } - if f == "PrimaryEmail" { + if f == prefix+"PrimaryEmail" { patchee.PrimaryEmail = patcher.PrimaryEmail + continue } - if f == "Notes" { + if f == prefix+"Notes" { patchee.Notes = patcher.Notes + continue } - if f == "Emails" { + if f == prefix+"Emails" { patchee.Emails = patcher.Emails - filterEmails := EmailORM{} - if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ContactORM") + continue + } + if !updatedHomeAddress && strings.HasPrefix(f, prefix+"HomeAddress.") { + updatedHomeAddress = true + if patcher.HomeAddress == nil { + patchee.HomeAddress = nil + continue + } + if patchee.HomeAddress == nil { + patchee.HomeAddress = &Address{} } - filterEmails.ContactId = new(int64) - *filterEmails.ContactId = ormObj.Id - filterEmails.AccountID = ormObj.AccountID - if err = db.Where(filterEmails).Delete(EmailORM{}).Error; err != nil { + if o, err := DefaultApplyFieldMaskAddress(ctx, patchee.HomeAddress, patcher.HomeAddress, &field_mask1.FieldMask{Paths: updateMask.Paths[i:]}, prefix+"HomeAddress.", db); err != nil { return nil, err + } else { + patchee.HomeAddress = o } + continue } - if f == "HomeAddress" { + if f == prefix+"HomeAddress" { + updatedHomeAddress = true patchee.HomeAddress = patcher.HomeAddress - filterHomeAddress := AddressORM{} - if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ContactORM") + continue + } + if !updatedWorkAddress && strings.HasPrefix(f, prefix+"WorkAddress.") { + updatedWorkAddress = true + if patcher.WorkAddress == nil { + patchee.WorkAddress = nil + continue } - filterHomeAddress.HomeAddressContactId = new(int64) - *filterHomeAddress.HomeAddressContactId = ormObj.Id - filterHomeAddress.AccountID = ormObj.AccountID - if err = db.Where(filterHomeAddress).Delete(AddressORM{}).Error; err != nil { + if patchee.WorkAddress == nil { + patchee.WorkAddress = &Address{} + } + if o, err := DefaultApplyFieldMaskAddress(ctx, patchee.WorkAddress, patcher.WorkAddress, &field_mask1.FieldMask{Paths: updateMask.Paths[i:]}, prefix+"WorkAddress.", db); err != nil { return nil, err + } else { + patchee.WorkAddress = o } + continue } - if f == "WorkAddress" { + if f == prefix+"WorkAddress" { + updatedWorkAddress = true patchee.WorkAddress = patcher.WorkAddress - filterWorkAddress := AddressORM{} - if ormObj.Id == 0 { - return nil, errors.New("Can't do overwriting update with no Id value for ContactORM") - } - filterWorkAddress.WorkAddressContactId = new(int64) - *filterWorkAddress.WorkAddressContactId = ormObj.Id - filterWorkAddress.AccountID = ormObj.AccountID - if err = db.Where(filterWorkAddress).Delete(AddressORM{}).Error; err != nil { - return nil, err - } + continue } - if f == "ProfileId" { + if f == prefix+"ProfileId" { patchee.ProfileId = patcher.ProfileId + continue } - if f == "Groups" { + if f == prefix+"Groups" { patchee.Groups = patcher.Groups + continue } - if f == "Nicknames" { + if !updatedNicknames && strings.HasPrefix(f, prefix+"Nicknames") { patchee.Nicknames = patcher.Nicknames + updatedNicknames = true + continue } } if err != nil { @@ -1425,29 +1863,37 @@ func DefaultApplyFieldMaskContact(ctx context.Context, patchee *Contact, ormObj } // DefaultListContact executes a gorm list call -func DefaultListContact(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Contact, error) { - ormResponse := []ContactORM{} - f, s, p, fs, err := getCollectionOperators(req) - if err != nil { - return nil, err - } - db, err = gorm2.ApplyCollectionOperators(db, &ContactORM{}, f, s, p, fs) +func DefaultListContact(ctx context.Context, db *gorm1.DB, f *query1.Filtering, s *query1.Sorting, p *query1.Pagination, fs *query1.FieldSelection) ([]*Contact, error) { + in := Contact{} + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } - if fs.GetFields() == nil { - db = db.Set("gorm:auto_preload", true) + if hook, ok := interface{}(&ormObj).(ContactORMWithBeforeListApplyQuery); ok { + if db, err = hook.BeforeListApplyQuery(ctx, db, f, s, p, fs); err != nil { + return nil, err + } } - in := Contact{} - ormParams, err := in.ToORM(ctx) + db, err = gorm2.ApplyCollectionOperators(ctx, db, &ContactORM{}, &Contact{}, f, s, p, fs) if err != nil { return nil, err } - db = db.Where(&ormParams) + if hook, ok := interface{}(&ormObj).(ContactORMWithBeforeListFind); ok { + if db, err = hook.BeforeListFind(ctx, db, f, s, p, fs); err != nil { + return nil, err + } + } + db = db.Where(&ormObj) db = db.Order("id") + ormResponse := []ContactORM{} if err := db.Find(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(ContactORMWithAfterListFind); ok { + if err = hook.AfterListFind(ctx, db, &ormResponse, f, s, p, fs); err != nil { + return nil, err + } + } pbResponse := []*Contact{} for _, responseEntry := range ormResponse { temp, err := responseEntry.ToPB(ctx) @@ -1459,83 +1905,173 @@ func DefaultListContact(ctx context.Context, db *gorm1.DB, req interface{}) ([]* return pbResponse, nil } +type ContactORMWithBeforeListApplyQuery interface { + BeforeListApplyQuery(context.Context, *gorm1.DB, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) (*gorm1.DB, error) +} +type ContactORMWithBeforeListFind interface { + BeforeListFind(context.Context, *gorm1.DB, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) (*gorm1.DB, error) +} +type ContactORMWithAfterListFind interface { + AfterListFind(context.Context, *gorm1.DB, *[]ContactORM, *query1.Filtering, *query1.Sorting, *query1.Pagination, *query1.FieldSelection) error +} + // DefaultCreateEmail executes a basic gorm create call func DefaultCreateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultCreateEmail") + return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeCreate_); ok { + if db, err = hook.BeforeCreate_(ctx, db); err != nil { + return nil, err + } + } if err = db.Create(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(EmailORMWithAfterCreate_); ok { + if err = hook.AfterCreate_(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) return &pbResponse, err } +type EmailORMWithBeforeCreate_ interface { + BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithAfterCreate_ interface { + AfterCreate_(context.Context, *gorm1.DB) error +} + // DefaultReadEmail executes a basic gorm read call func DefaultReadEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultReadEmail") + return nil, errors1.NilArgumentError } - db = db.Set("gorm:auto_preload", true) - ormParams, err := in.ToORM(ctx) + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if ormObj.Id == 0 { + return nil, errors1.EmptyIdError + } + if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeReadApplyQuery); ok { + if db, err = hook.BeforeReadApplyQuery(ctx, db); err != nil { + return nil, err + } + } + if db, err = gorm2.ApplyFieldSelection(ctx, db, nil, &EmailORM{}); err != nil { + return nil, err + } + if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeReadFind); ok { + if db, err = hook.BeforeReadFind(ctx, db); err != nil { + return nil, err + } + } ormResponse := EmailORM{} - if err = db.Where(&ormParams).First(&ormResponse).Error; err != nil { + if err = db.Where(&ormObj).First(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormResponse).(EmailORMWithAfterReadFind); ok { + if err = hook.AfterReadFind(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormResponse.ToPB(ctx) return &pbResponse, err } -// DefaultUpdateEmail executes a basic gorm update call -func DefaultUpdateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error) { +type EmailORMWithBeforeReadApplyQuery interface { + BeforeReadApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithBeforeReadFind interface { + BeforeReadFind(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithAfterReadFind interface { + AfterReadFind(context.Context, *gorm1.DB) error +} + +func DefaultDeleteEmail(ctx context.Context, in *Email, db *gorm1.DB) error { if in == nil { - return nil, errors.New("Nil argument to DefaultUpdateEmail") + return errors1.NilArgumentError } - accountID, err := auth1.GetAccountID(ctx, nil) + ormObj, err := in.ToORM(ctx) if err != nil { - return nil, err + return err } - if exists, err := DefaultReadEmail(ctx, &Email{Id: in.GetId()}, db); err != nil { - return nil, err - } else if exists == nil { - return nil, errors.New("Email not found") + if ormObj.Id == 0 { + return errors1.EmptyIdError } - ormObj, err := in.ToORM(ctx) + if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeDelete_); ok { + if db, err = hook.BeforeDelete_(ctx, db); err != nil { + return err + } + } + err = db.Where(&ormObj).Delete(&EmailORM{}).Error if err != nil { - return nil, err + return err } - ormObj.AccountID = accountID - db = db.Where(&EmailORM{AccountID: accountID}) - if err = db.Save(&ormObj).Error; err != nil { - return nil, err + if hook, ok := interface{}(&ormObj).(EmailORMWithAfterDelete_); ok { + err = hook.AfterDelete_(ctx, db) } - pbResponse, err := ormObj.ToPB(ctx) - return &pbResponse, err + return err } -func DefaultDeleteEmail(ctx context.Context, in *Email, db *gorm1.DB) error { +type EmailORMWithBeforeDelete_ interface { + BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithAfterDelete_ interface { + AfterDelete_(context.Context, *gorm1.DB) error +} + +func DefaultDeleteEmailSet(ctx context.Context, in []*Email, db *gorm1.DB) error { if in == nil { - return errors.New("Nil argument to DefaultDeleteEmail") + return errors1.NilArgumentError } - ormObj, err := in.ToORM(ctx) + var err error + keys := []uint64{} + for _, obj := range in { + ormObj, err := obj.ToORM(ctx) + if err != nil { + return err + } + if ormObj.Id == 0 { + return errors1.EmptyIdError + } + keys = append(keys, ormObj.Id) + } + if hook, ok := (interface{}(&EmailORM{})).(EmailORMWithBeforeDeleteSet); ok { + if db, err = hook.BeforeDeleteSet(ctx, in, db); err != nil { + return err + } + } + acctId, err := auth1.GetAccountID(ctx, nil) if err != nil { return err } - if ormObj.Id == 0 { - return errors.New("A non-zero ID value is required for a delete call") + err = db.Where("account_id = ? AND id in (?)", acctId, keys).Delete(&EmailORM{}).Error + if err != nil { + return err + } + if hook, ok := (interface{}(&EmailORM{})).(EmailORMWithAfterDeleteSet); ok { + err = hook.AfterDeleteSet(ctx, in, db) } - err = db.Where(&ormObj).Delete(&EmailORM{}).Error return err } -// DefaultStrictUpdateEmail clears first level 1:many children and then executes a gorm update call +type EmailORMWithBeforeDeleteSet interface { + BeforeDeleteSet(context.Context, []*Email, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithAfterDeleteSet interface { + AfterDeleteSet(context.Context, []*Email, *gorm1.DB) error +} + +// DefaultStrictUpdateEmail clears / replaces / appends first level 1:many children and then executes a gorm update call func DefaultStrictUpdateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Email, error) { if in == nil { return nil, fmt.Errorf("Nil argument to DefaultStrictUpdateEmail") @@ -1544,79 +2080,138 @@ func DefaultStrictUpdateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Em if err != nil { return nil, err } - count := 1 - err = db.Model(&ormObj).Where("id=?", ormObj.Id).Count(&count).Error + accountID, err := auth1.GetAccountID(ctx, nil) if err != nil { return nil, err } - db = db.Where(&EmailORM{AccountID: ormObj.AccountID}) + db = db.Where(map[string]interface{}{"account_id": accountID}) + lockedRow := &EmailORM{} + db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeStrictUpdateCleanup); ok { + if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { + return nil, err + } + } + if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeStrictUpdateSave); ok { + if db, err = hook.BeforeStrictUpdateSave(ctx, db); err != nil { + return nil, err + } + } if err = db.Save(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(EmailORMWithAfterStrictUpdateSave); ok { + if err = hook.AfterStrictUpdateSave(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) if err != nil { return nil, err } - if count == 0 { - err = gateway1.SetCreated(ctx, "") - } return &pbResponse, err } +type EmailORMWithBeforeStrictUpdateCleanup interface { + BeforeStrictUpdateCleanup(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithBeforeStrictUpdateSave interface { + BeforeStrictUpdateSave(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithAfterStrictUpdateSave interface { + AfterStrictUpdateSave(context.Context, *gorm1.DB) error +} + // DefaultPatchEmail executes a basic gorm update call with patch behavior func DefaultPatchEmail(ctx context.Context, in *Email, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Email, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultPatchEmail") + return nil, errors1.NilArgumentError } - accountID, err := auth1.GetAccountID(ctx, nil) - if err != nil { - return nil, err + var pbObj Email + var err error + if hook, ok := interface{}(&pbObj).(EmailWithBeforePatchRead); ok { + if db, err = hook.BeforePatchRead(ctx, in, updateMask, db); err != nil { + return nil, err + } } pbReadRes, err := DefaultReadEmail(ctx, &Email{Id: in.GetId()}, db) if err != nil { return nil, err } - pbObj := *pbReadRes - ormObj, err := pbObj.ToORM(ctx) - if err != nil { - return nil, err + pbObj = *pbReadRes + if hook, ok := interface{}(&pbObj).(EmailWithBeforePatchApplyFieldMask); ok { + if db, err = hook.BeforePatchApplyFieldMask(ctx, in, updateMask, db); err != nil { + return nil, err + } } - if _, err := DefaultApplyFieldMaskEmail(ctx, &pbObj, &ormObj, in, updateMask, db); err != nil { + if _, err := DefaultApplyFieldMaskEmail(ctx, &pbObj, in, updateMask, "", db); err != nil { return nil, err } if hook, ok := interface{}(&pbObj).(EmailWithBeforePatchSave); ok { - if ctx, db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { + if db, err = hook.BeforePatchSave(ctx, in, updateMask, db); err != nil { return nil, err } } - ormObj, err = pbObj.ToORM(ctx) + pbResponse, err := DefaultStrictUpdateEmail(ctx, &pbObj, db) if err != nil { return nil, err } - db = db.Where(&EmailORM{AccountID: accountID}) - if err = db.Save(&ormObj).Error; err != nil { - return nil, err - } - pbObj, err = ormObj.ToPB(ctx) - if err != nil { - return nil, err + if hook, ok := interface{}(pbResponse).(EmailWithAfterPatchSave); ok { + if err = hook.AfterPatchSave(ctx, in, updateMask, db); err != nil { + return nil, err + } } - return &pbObj, err + return pbResponse, nil } +type EmailWithBeforePatchRead interface { + BeforePatchRead(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} +type EmailWithBeforePatchApplyFieldMask interface { + BeforePatchApplyFieldMask(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} type EmailWithBeforePatchSave interface { - BeforePatchSave(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforePatchSave(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) (*gorm1.DB, error) +} +type EmailWithAfterPatchSave interface { + AfterPatchSave(context.Context, *Email, *field_mask1.FieldMask, *gorm1.DB) error +} + +// DefaultPatchSetEmail executes a bulk gorm update call with patch behavior +func DefaultPatchSetEmail(ctx context.Context, objects []*Email, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*Email, error) { + if len(objects) != len(updateMasks) { + return nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(updateMasks), len(objects)) + } + + results := make([]*Email, 0, len(objects)) + for i, patcher := range objects { + pbResponse, err := DefaultPatchEmail(ctx, patcher, updateMasks[i], db) + if err != nil { + return nil, err + } + + results = append(results, pbResponse) + } + + return results, nil } // DefaultApplyFieldMaskEmail patches an pbObject with patcher according to a field mask. -func DefaultApplyFieldMaskEmail(ctx context.Context, patchee *Email, ormObj *EmailORM, patcher *Email, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Email, error) { +func DefaultApplyFieldMaskEmail(ctx context.Context, patchee *Email, patcher *Email, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Email, error) { + if patcher == nil { + return nil, nil + } else if patchee == nil { + return nil, errors1.NilArgumentError + } var err error - for _, f := range updateMask.GetPaths() { - if f == "Id" { + for _, f := range updateMask.Paths { + if f == prefix+"Id" { patchee.Id = patcher.Id + continue } - if f == "Address" { + if f == prefix+"Address" { patchee.Address = patcher.Address + continue } } if err != nil { @@ -1626,29 +2221,37 @@ func DefaultApplyFieldMaskEmail(ctx context.Context, patchee *Email, ormObj *Ema } // DefaultListEmail executes a gorm list call -func DefaultListEmail(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Email, error) { - ormResponse := []EmailORM{} - f, s, p, fs, err := getCollectionOperators(req) - if err != nil { - return nil, err - } - db, err = gorm2.ApplyCollectionOperators(db, &EmailORM{}, f, s, p, fs) +func DefaultListEmail(ctx context.Context, db *gorm1.DB) ([]*Email, error) { + in := Email{} + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } - if fs.GetFields() == nil { - db = db.Set("gorm:auto_preload", true) + if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeListApplyQuery); ok { + if db, err = hook.BeforeListApplyQuery(ctx, db); err != nil { + return nil, err + } } - in := Email{} - ormParams, err := in.ToORM(ctx) + db, err = gorm2.ApplyCollectionOperators(ctx, db, &EmailORM{}, &Email{}, nil, nil, nil, nil) if err != nil { return nil, err } - db = db.Where(&ormParams) + if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeListFind); ok { + if db, err = hook.BeforeListFind(ctx, db); err != nil { + return nil, err + } + } + db = db.Where(&ormObj) db = db.Order("id") + ormResponse := []EmailORM{} if err := db.Find(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(EmailORMWithAfterListFind); ok { + if err = hook.AfterListFind(ctx, db, &ormResponse); err != nil { + return nil, err + } + } pbResponse := []*Email{} for _, responseEntry := range ormResponse { temp, err := responseEntry.ToPB(ctx) @@ -1660,45 +2263,116 @@ func DefaultListEmail(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Em return pbResponse, nil } +type EmailORMWithBeforeListApplyQuery interface { + BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithBeforeListFind interface { + BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type EmailORMWithAfterListFind interface { + AfterListFind(context.Context, *gorm1.DB, *[]EmailORM) error +} + // DefaultCreateAddress executes a basic gorm create call func DefaultCreateAddress(ctx context.Context, in *Address, db *gorm1.DB) (*Address, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultCreateAddress") + return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(AddressORMWithBeforeCreate_); ok { + if db, err = hook.BeforeCreate_(ctx, db); err != nil { + return nil, err + } + } if err = db.Create(&ormObj).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(AddressORMWithAfterCreate_); ok { + if err = hook.AfterCreate_(ctx, db); err != nil { + return nil, err + } + } pbResponse, err := ormObj.ToPB(ctx) return &pbResponse, err } -// DefaultListAddress executes a gorm list call -func DefaultListAddress(ctx context.Context, db *gorm1.DB, req interface{}) ([]*Address, error) { - ormResponse := []AddressORM{} - f, s, p, fs, err := getCollectionOperators(req) +type AddressORMWithBeforeCreate_ interface { + BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type AddressORMWithAfterCreate_ interface { + AfterCreate_(context.Context, *gorm1.DB) error +} + +// DefaultApplyFieldMaskAddress patches an pbObject with patcher according to a field mask. +func DefaultApplyFieldMaskAddress(ctx context.Context, patchee *Address, patcher *Address, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Address, error) { + if patcher == nil { + return nil, nil + } else if patchee == nil { + return nil, errors1.NilArgumentError + } + var err error + for _, f := range updateMask.Paths { + if f == prefix+"Address" { + patchee.Address = patcher.Address + continue + } + if f == prefix+"City" { + patchee.City = patcher.City + continue + } + if f == prefix+"State" { + patchee.State = patcher.State + continue + } + if f == prefix+"Zip" { + patchee.Zip = patcher.Zip + continue + } + if f == prefix+"Country" { + patchee.Country = patcher.Country + continue + } + } if err != nil { return nil, err } - db, err = gorm2.ApplyCollectionOperators(db, &AddressORM{}, f, s, p, fs) + return patchee, nil +} + +// DefaultListAddress executes a gorm list call +func DefaultListAddress(ctx context.Context, db *gorm1.DB) ([]*Address, error) { + in := Address{} + ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } - if fs.GetFields() == nil { - db = db.Set("gorm:auto_preload", true) + if hook, ok := interface{}(&ormObj).(AddressORMWithBeforeListApplyQuery); ok { + if db, err = hook.BeforeListApplyQuery(ctx, db); err != nil { + return nil, err + } } - in := Address{} - ormParams, err := in.ToORM(ctx) + db, err = gorm2.ApplyCollectionOperators(ctx, db, &AddressORM{}, &Address{}, nil, nil, nil, nil) if err != nil { return nil, err } - db = db.Where(&ormParams) + if hook, ok := interface{}(&ormObj).(AddressORMWithBeforeListFind); ok { + if db, err = hook.BeforeListFind(ctx, db); err != nil { + return nil, err + } + } + db = db.Where(&ormObj) + ormResponse := []AddressORM{} if err := db.Find(&ormResponse).Error; err != nil { return nil, err } + if hook, ok := interface{}(&ormObj).(AddressORMWithAfterListFind); ok { + if err = hook.AfterListFind(ctx, db, &ormResponse); err != nil { + return nil, err + } + } pbResponse := []*Address{} for _, responseEntry := range ormResponse { temp, err := responseEntry.ToPB(ctx) @@ -1710,6 +2384,15 @@ func DefaultListAddress(ctx context.Context, db *gorm1.DB, req interface{}) ([]* return pbResponse, nil } +type AddressORMWithBeforeListApplyQuery interface { + BeforeListApplyQuery(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type AddressORMWithBeforeListFind interface { + BeforeListFind(context.Context, *gorm1.DB) (*gorm1.DB, error) +} +type AddressORMWithAfterListFind interface { + AfterListFind(context.Context, *gorm1.DB, *[]AddressORM) error +} type ProfilesDefaultServer struct { DB *gorm1.DB } @@ -1719,8 +2402,7 @@ func (m *ProfilesDefaultServer) Create(ctx context.Context, in *CreateProfileReq db := m.DB if custom, ok := interface{}(in).(ProfilesProfileWithBeforeCreate); ok { var err error - ctx, db, err = custom.BeforeCreate(ctx, in, db) - if err != nil { + if db, err = custom.BeforeCreate(ctx, db); err != nil { return nil, err } } @@ -1728,12 +2410,24 @@ func (m *ProfilesDefaultServer) Create(ctx context.Context, in *CreateProfileReq if err != nil { return nil, err } - return &CreateProfileResponse{Result: res}, nil + out := &CreateProfileResponse{Result: res} + if custom, ok := interface{}(in).(ProfilesProfileWithAfterCreate); ok { + var err error + if err = custom.AfterCreate(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // ProfilesProfileWithBeforeCreate called before DefaultCreateProfile in the default Create handler type ProfilesProfileWithBeforeCreate interface { - BeforeCreate(context.Context, *CreateProfileRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeCreate(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ProfilesProfileWithAfterCreate called before DefaultCreateProfile in the default Create handler +type ProfilesProfileWithAfterCreate interface { + AfterCreate(context.Context, *CreateProfileResponse, *gorm1.DB) error } // Read ... @@ -1741,8 +2435,7 @@ func (m *ProfilesDefaultServer) Read(ctx context.Context, in *ReadProfileRequest db := m.DB if custom, ok := interface{}(in).(ProfilesProfileWithBeforeRead); ok { var err error - ctx, db, err = custom.BeforeRead(ctx, in, db) - if err != nil { + if db, err = custom.BeforeRead(ctx, db); err != nil { return nil, err } } @@ -1750,12 +2443,24 @@ func (m *ProfilesDefaultServer) Read(ctx context.Context, in *ReadProfileRequest if err != nil { return nil, err } - return &ReadProfileResponse{Result: res}, nil + out := &ReadProfileResponse{Result: res} + if custom, ok := interface{}(in).(ProfilesProfileWithAfterRead); ok { + var err error + if err = custom.AfterRead(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // ProfilesProfileWithBeforeRead called before DefaultReadProfile in the default Read handler type ProfilesProfileWithBeforeRead interface { - BeforeRead(context.Context, *ReadProfileRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeRead(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ProfilesProfileWithAfterRead called before DefaultReadProfile in the default Read handler +type ProfilesProfileWithAfterRead interface { + AfterRead(context.Context, *ReadProfileResponse, *gorm1.DB) error } // Update ... @@ -1765,8 +2470,7 @@ func (m *ProfilesDefaultServer) Update(ctx context.Context, in *UpdateProfileReq db := m.DB if custom, ok := interface{}(in).(ProfilesProfileWithBeforeUpdate); ok { var err error - ctx, db, err = custom.BeforeUpdate(ctx, in, db) - if err != nil { + if db, err = custom.BeforeUpdate(ctx, db); err != nil { return nil, err } } @@ -1774,12 +2478,24 @@ func (m *ProfilesDefaultServer) Update(ctx context.Context, in *UpdateProfileReq if err != nil { return nil, err } - return &UpdateProfileResponse{Result: res}, nil + out := &UpdateProfileResponse{Result: res} + if custom, ok := interface{}(in).(ProfilesProfileWithAfterUpdate); ok { + var err error + if err = custom.AfterUpdate(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // ProfilesProfileWithBeforeUpdate called before DefaultUpdateProfile in the default Update handler type ProfilesProfileWithBeforeUpdate interface { - BeforeUpdate(context.Context, *UpdateProfileRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeUpdate(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ProfilesProfileWithAfterUpdate called before DefaultUpdateProfile in the default Update handler +type ProfilesProfileWithAfterUpdate interface { + AfterUpdate(context.Context, *UpdateProfileResponse, *gorm1.DB) error } // Delete ... @@ -1787,17 +2503,32 @@ func (m *ProfilesDefaultServer) Delete(ctx context.Context, in *DeleteProfileReq db := m.DB if custom, ok := interface{}(in).(ProfilesProfileWithBeforeDelete); ok { var err error - ctx, db, err = custom.BeforeDelete(ctx, in, db) - if err != nil { + if db, err = custom.BeforeDelete(ctx, db); err != nil { + return nil, err + } + } + err := DefaultDeleteProfile(ctx, &Profile{Id: in.GetId()}, db) + if err != nil { + return nil, err + } + out := &DeleteProfileResponse{} + if custom, ok := interface{}(in).(ProfilesProfileWithAfterDelete); ok { + var err error + if err = custom.AfterDelete(ctx, out, db); err != nil { return nil, err } } - return &DeleteProfileResponse{}, DefaultDeleteProfile(ctx, &Profile{Id: in.GetId()}, db) + return out, nil } // ProfilesProfileWithBeforeDelete called before DefaultDeleteProfile in the default Delete handler type ProfilesProfileWithBeforeDelete interface { - BeforeDelete(context.Context, *DeleteProfileRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeDelete(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ProfilesProfileWithAfterDelete called before DefaultDeleteProfile in the default Delete handler +type ProfilesProfileWithAfterDelete interface { + AfterDelete(context.Context, *DeleteProfileResponse, *gorm1.DB) error } // List ... @@ -1805,21 +2536,32 @@ func (m *ProfilesDefaultServer) List(ctx context.Context, in *ListProfileRequest db := m.DB if custom, ok := interface{}(in).(ProfilesProfileWithBeforeList); ok { var err error - ctx, db, err = custom.BeforeList(ctx, in, db) - if err != nil { + if db, err = custom.BeforeList(ctx, db); err != nil { return nil, err } } - res, err := DefaultListProfile(ctx, db, in) + res, err := DefaultListProfile(ctx, db, in.Filter, in.OrderBy, in.Paging, in.Fields) if err != nil { return nil, err } - return &ListProfilesResponse{Results: res}, nil + out := &ListProfilesResponse{Results: res} + if custom, ok := interface{}(in).(ProfilesProfileWithAfterList); ok { + var err error + if err = custom.AfterList(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // ProfilesProfileWithBeforeList called before DefaultListProfile in the default List handler type ProfilesProfileWithBeforeList interface { - BeforeList(context.Context, *ListProfileRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeList(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ProfilesProfileWithAfterList called before DefaultListProfile in the default List handler +type ProfilesProfileWithAfterList interface { + AfterList(context.Context, *ListProfilesResponse, *gorm1.DB) error } type GroupsDefaultServer struct { DB *gorm1.DB @@ -1830,8 +2572,7 @@ func (m *GroupsDefaultServer) Create(ctx context.Context, in *CreateGroupRequest db := m.DB if custom, ok := interface{}(in).(GroupsGroupWithBeforeCreate); ok { var err error - ctx, db, err = custom.BeforeCreate(ctx, in, db) - if err != nil { + if db, err = custom.BeforeCreate(ctx, db); err != nil { return nil, err } } @@ -1839,12 +2580,24 @@ func (m *GroupsDefaultServer) Create(ctx context.Context, in *CreateGroupRequest if err != nil { return nil, err } - return &CreateGroupResponse{Result: res}, nil + out := &CreateGroupResponse{Result: res} + if custom, ok := interface{}(in).(GroupsGroupWithAfterCreate); ok { + var err error + if err = custom.AfterCreate(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // GroupsGroupWithBeforeCreate called before DefaultCreateGroup in the default Create handler type GroupsGroupWithBeforeCreate interface { - BeforeCreate(context.Context, *CreateGroupRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeCreate(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// GroupsGroupWithAfterCreate called before DefaultCreateGroup in the default Create handler +type GroupsGroupWithAfterCreate interface { + AfterCreate(context.Context, *CreateGroupResponse, *gorm1.DB) error } // Read ... @@ -1852,8 +2605,7 @@ func (m *GroupsDefaultServer) Read(ctx context.Context, in *ReadGroupRequest) (* db := m.DB if custom, ok := interface{}(in).(GroupsGroupWithBeforeRead); ok { var err error - ctx, db, err = custom.BeforeRead(ctx, in, db) - if err != nil { + if db, err = custom.BeforeRead(ctx, db); err != nil { return nil, err } } @@ -1861,12 +2613,24 @@ func (m *GroupsDefaultServer) Read(ctx context.Context, in *ReadGroupRequest) (* if err != nil { return nil, err } - return &ReadGroupResponse{Result: res}, nil + out := &ReadGroupResponse{Result: res} + if custom, ok := interface{}(in).(GroupsGroupWithAfterRead); ok { + var err error + if err = custom.AfterRead(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // GroupsGroupWithBeforeRead called before DefaultReadGroup in the default Read handler type GroupsGroupWithBeforeRead interface { - BeforeRead(context.Context, *ReadGroupRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeRead(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// GroupsGroupWithAfterRead called before DefaultReadGroup in the default Read handler +type GroupsGroupWithAfterRead interface { + AfterRead(context.Context, *ReadGroupResponse, *gorm1.DB) error } // Update ... @@ -1876,8 +2640,7 @@ func (m *GroupsDefaultServer) Update(ctx context.Context, in *UpdateGroupRequest db := m.DB if custom, ok := interface{}(in).(GroupsGroupWithBeforeUpdate); ok { var err error - ctx, db, err = custom.BeforeUpdate(ctx, in, db) - if err != nil { + if db, err = custom.BeforeUpdate(ctx, db); err != nil { return nil, err } } @@ -1885,12 +2648,24 @@ func (m *GroupsDefaultServer) Update(ctx context.Context, in *UpdateGroupRequest if err != nil { return nil, err } - return &UpdateGroupResponse{Result: res}, nil + out := &UpdateGroupResponse{Result: res} + if custom, ok := interface{}(in).(GroupsGroupWithAfterUpdate); ok { + var err error + if err = custom.AfterUpdate(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // GroupsGroupWithBeforeUpdate called before DefaultUpdateGroup in the default Update handler type GroupsGroupWithBeforeUpdate interface { - BeforeUpdate(context.Context, *UpdateGroupRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeUpdate(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// GroupsGroupWithAfterUpdate called before DefaultUpdateGroup in the default Update handler +type GroupsGroupWithAfterUpdate interface { + AfterUpdate(context.Context, *UpdateGroupResponse, *gorm1.DB) error } // Delete ... @@ -1898,17 +2673,32 @@ func (m *GroupsDefaultServer) Delete(ctx context.Context, in *DeleteGroupRequest db := m.DB if custom, ok := interface{}(in).(GroupsGroupWithBeforeDelete); ok { var err error - ctx, db, err = custom.BeforeDelete(ctx, in, db) - if err != nil { + if db, err = custom.BeforeDelete(ctx, db); err != nil { return nil, err } } - return &DeleteGroupResponse{}, DefaultDeleteGroup(ctx, &Group{Id: in.GetId()}, db) + err := DefaultDeleteGroup(ctx, &Group{Id: in.GetId()}, db) + if err != nil { + return nil, err + } + out := &DeleteGroupResponse{} + if custom, ok := interface{}(in).(GroupsGroupWithAfterDelete); ok { + var err error + if err = custom.AfterDelete(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // GroupsGroupWithBeforeDelete called before DefaultDeleteGroup in the default Delete handler type GroupsGroupWithBeforeDelete interface { - BeforeDelete(context.Context, *DeleteGroupRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeDelete(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// GroupsGroupWithAfterDelete called before DefaultDeleteGroup in the default Delete handler +type GroupsGroupWithAfterDelete interface { + AfterDelete(context.Context, *DeleteGroupResponse, *gorm1.DB) error } // List ... @@ -1916,21 +2706,32 @@ func (m *GroupsDefaultServer) List(ctx context.Context, in *ListGroupRequest) (* db := m.DB if custom, ok := interface{}(in).(GroupsGroupWithBeforeList); ok { var err error - ctx, db, err = custom.BeforeList(ctx, in, db) - if err != nil { + if db, err = custom.BeforeList(ctx, db); err != nil { return nil, err } } - res, err := DefaultListGroup(ctx, db, in) + res, err := DefaultListGroup(ctx, db, in.Filter, in.OrderBy, in.Paging, in.Fields) if err != nil { return nil, err } - return &ListGroupsResponse{Results: res}, nil + out := &ListGroupsResponse{Results: res} + if custom, ok := interface{}(in).(GroupsGroupWithAfterList); ok { + var err error + if err = custom.AfterList(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // GroupsGroupWithBeforeList called before DefaultListGroup in the default List handler type GroupsGroupWithBeforeList interface { - BeforeList(context.Context, *ListGroupRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeList(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// GroupsGroupWithAfterList called before DefaultListGroup in the default List handler +type GroupsGroupWithAfterList interface { + AfterList(context.Context, *ListGroupsResponse, *gorm1.DB) error } type ContactsDefaultServer struct { DB *gorm1.DB @@ -1941,8 +2742,7 @@ func (m *ContactsDefaultServer) Create(ctx context.Context, in *CreateContactReq db := m.DB if custom, ok := interface{}(in).(ContactsContactWithBeforeCreate); ok { var err error - ctx, db, err = custom.BeforeCreate(ctx, in, db) - if err != nil { + if db, err = custom.BeforeCreate(ctx, db); err != nil { return nil, err } } @@ -1950,12 +2750,24 @@ func (m *ContactsDefaultServer) Create(ctx context.Context, in *CreateContactReq if err != nil { return nil, err } - return &CreateContactResponse{Result: res}, nil + out := &CreateContactResponse{Result: res} + if custom, ok := interface{}(in).(ContactsContactWithAfterCreate); ok { + var err error + if err = custom.AfterCreate(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // ContactsContactWithBeforeCreate called before DefaultCreateContact in the default Create handler type ContactsContactWithBeforeCreate interface { - BeforeCreate(context.Context, *CreateContactRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeCreate(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ContactsContactWithAfterCreate called before DefaultCreateContact in the default Create handler +type ContactsContactWithAfterCreate interface { + AfterCreate(context.Context, *CreateContactResponse, *gorm1.DB) error } // Read ... @@ -1963,8 +2775,7 @@ func (m *ContactsDefaultServer) Read(ctx context.Context, in *ReadContactRequest db := m.DB if custom, ok := interface{}(in).(ContactsContactWithBeforeRead); ok { var err error - ctx, db, err = custom.BeforeRead(ctx, in, db) - if err != nil { + if db, err = custom.BeforeRead(ctx, db); err != nil { return nil, err } } @@ -1972,12 +2783,24 @@ func (m *ContactsDefaultServer) Read(ctx context.Context, in *ReadContactRequest if err != nil { return nil, err } - return &ReadContactResponse{Result: res}, nil + out := &ReadContactResponse{Result: res} + if custom, ok := interface{}(in).(ContactsContactWithAfterRead); ok { + var err error + if err = custom.AfterRead(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // ContactsContactWithBeforeRead called before DefaultReadContact in the default Read handler type ContactsContactWithBeforeRead interface { - BeforeRead(context.Context, *ReadContactRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeRead(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ContactsContactWithAfterRead called before DefaultReadContact in the default Read handler +type ContactsContactWithAfterRead interface { + AfterRead(context.Context, *ReadContactResponse, *gorm1.DB) error } // Update ... @@ -1987,8 +2810,7 @@ func (m *ContactsDefaultServer) Update(ctx context.Context, in *UpdateContactReq db := m.DB if custom, ok := interface{}(in).(ContactsContactWithBeforeUpdate); ok { var err error - ctx, db, err = custom.BeforeUpdate(ctx, in, db) - if err != nil { + if db, err = custom.BeforeUpdate(ctx, db); err != nil { return nil, err } } @@ -2000,12 +2822,24 @@ func (m *ContactsDefaultServer) Update(ctx context.Context, in *UpdateContactReq if err != nil { return nil, err } - return &UpdateContactResponse{Result: res}, nil + out := &UpdateContactResponse{Result: res} + if custom, ok := interface{}(in).(ContactsContactWithAfterUpdate); ok { + var err error + if err = custom.AfterUpdate(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // ContactsContactWithBeforeUpdate called before DefaultUpdateContact in the default Update handler type ContactsContactWithBeforeUpdate interface { - BeforeUpdate(context.Context, *UpdateContactRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeUpdate(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ContactsContactWithAfterUpdate called before DefaultUpdateContact in the default Update handler +type ContactsContactWithAfterUpdate interface { + AfterUpdate(context.Context, *UpdateContactResponse, *gorm1.DB) error } // Delete ... @@ -2013,17 +2847,32 @@ func (m *ContactsDefaultServer) Delete(ctx context.Context, in *DeleteContactReq db := m.DB if custom, ok := interface{}(in).(ContactsContactWithBeforeDelete); ok { var err error - ctx, db, err = custom.BeforeDelete(ctx, in, db) - if err != nil { + if db, err = custom.BeforeDelete(ctx, db); err != nil { + return nil, err + } + } + err := DefaultDeleteContact(ctx, &Contact{Id: in.GetId()}, db) + if err != nil { + return nil, err + } + out := &DeleteContactResponse{} + if custom, ok := interface{}(in).(ContactsContactWithAfterDelete); ok { + var err error + if err = custom.AfterDelete(ctx, out, db); err != nil { return nil, err } } - return &DeleteContactResponse{}, DefaultDeleteContact(ctx, &Contact{Id: in.GetId()}, db) + return out, nil } // ContactsContactWithBeforeDelete called before DefaultDeleteContact in the default Delete handler type ContactsContactWithBeforeDelete interface { - BeforeDelete(context.Context, *DeleteContactRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeDelete(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ContactsContactWithAfterDelete called before DefaultDeleteContact in the default Delete handler +type ContactsContactWithAfterDelete interface { + AfterDelete(context.Context, *DeleteContactResponse, *gorm1.DB) error } // List ... @@ -2031,24 +2880,36 @@ func (m *ContactsDefaultServer) List(ctx context.Context, in *ListContactRequest db := m.DB if custom, ok := interface{}(in).(ContactsContactWithBeforeList); ok { var err error - ctx, db, err = custom.BeforeList(ctx, in, db) - if err != nil { + if db, err = custom.BeforeList(ctx, db); err != nil { return nil, err } } - res, err := DefaultListContact(ctx, db, in) + res, err := DefaultListContact(ctx, db, in.Filter, in.OrderBy, in.Paging, in.Fields) if err != nil { return nil, err } - return &ListContactsResponse{Results: res}, nil + out := &ListContactsResponse{Results: res} + if custom, ok := interface{}(in).(ContactsContactWithAfterList); ok { + var err error + if err = custom.AfterList(ctx, out, db); err != nil { + return nil, err + } + } + return out, nil } // ContactsContactWithBeforeList called before DefaultListContact in the default List handler type ContactsContactWithBeforeList interface { - BeforeList(context.Context, *ListContactRequest, *gorm1.DB) (context.Context, *gorm1.DB, error) + BeforeList(context.Context, *gorm1.DB) (*gorm1.DB, error) +} + +// ContactsContactWithAfterList called before DefaultListContact in the default List handler +type ContactsContactWithAfterList interface { + AfterList(context.Context, *ListContactsResponse, *gorm1.DB) error } // SendSMS ... func (m *ContactsDefaultServer) SendSMS(ctx context.Context, in *SMSRequest) (*SMSResponse, error) { - return &SMSResponse{}, nil + out := &SMSResponse{} + return out, nil } diff --git a/pkg/pb/contacts.pb.gw.go b/pkg/pb/contacts.pb.gw.go index 0672caf..fa061c1 100644 --- a/pkg/pb/contacts.pb.gw.go +++ b/pkg/pb/contacts.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: pkg/pb/contacts.proto +// source: github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto /* Package pb is a reverse proxy. @@ -9,30 +9,39 @@ It translates gRPC into RESTful JSON APIs. package pb import ( + "context" "io" "net/http" + "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) +// Suppress "imported and not used" errors var _ codes.Code var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join func request_Profiles_Create_0(ctx context.Context, marshaler runtime.Marshaler, client ProfilesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateProfileRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Payload); err != nil && err != io.EOF { + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -41,6 +50,23 @@ func request_Profiles_Create_0(ctx context.Context, marshaler runtime.Marshaler, } +func local_request_Profiles_Create_0(ctx context.Context, marshaler runtime.Marshaler, server ProfilesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateProfileRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Create(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Profiles_Read_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "resource_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} ) @@ -67,7 +93,10 @@ func request_Profiles_Read_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Profiles_Read_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Profiles_Read_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -76,11 +105,49 @@ func request_Profiles_Read_0(ctx context.Context, marshaler runtime.Marshaler, c } +func local_request_Profiles_Read_0(ctx context.Context, marshaler runtime.Marshaler, server ProfilesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReadProfileRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Profiles_Read_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Read(ctx, &protoReq) + return msg, metadata, err + +} + func request_Profiles_Update_0(ctx context.Context, marshaler runtime.Marshaler, client ProfilesClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateProfileRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Payload); err != nil && err != io.EOF { + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -107,6 +174,41 @@ func request_Profiles_Update_0(ctx context.Context, marshaler runtime.Marshaler, } +func local_request_Profiles_Update_0(ctx context.Context, marshaler runtime.Marshaler, server ProfilesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateProfileRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["payload.id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payload.id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "payload.id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payload.id.resource_id", err) + } + + msg, err := server.Update(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Profiles_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "resource_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} ) @@ -133,7 +235,10 @@ func request_Profiles_Delete_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Profiles_Delete_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Profiles_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -142,6 +247,40 @@ func request_Profiles_Delete_0(ctx context.Context, marshaler runtime.Marshaler, } +func local_request_Profiles_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server ProfilesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteProfileRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Profiles_Delete_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Delete(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Profiles_List_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -150,7 +289,10 @@ func request_Profiles_List_0(ctx context.Context, marshaler runtime.Marshaler, c var protoReq ListProfileRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Profiles_List_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Profiles_List_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -159,11 +301,31 @@ func request_Profiles_List_0(ctx context.Context, marshaler runtime.Marshaler, c } +func local_request_Profiles_List_0(ctx context.Context, marshaler runtime.Marshaler, server ProfilesServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListProfileRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Profiles_List_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.List(ctx, &protoReq) + return msg, metadata, err + +} + func request_Groups_Create_0(ctx context.Context, marshaler runtime.Marshaler, client GroupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateGroupRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Payload); err != nil && err != io.EOF { + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -172,6 +334,23 @@ func request_Groups_Create_0(ctx context.Context, marshaler runtime.Marshaler, c } +func local_request_Groups_Create_0(ctx context.Context, marshaler runtime.Marshaler, server GroupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateGroupRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Create(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Groups_Read_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "resource_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} ) @@ -198,7 +377,10 @@ func request_Groups_Read_0(ctx context.Context, marshaler runtime.Marshaler, cli return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Groups_Read_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Groups_Read_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -207,11 +389,49 @@ func request_Groups_Read_0(ctx context.Context, marshaler runtime.Marshaler, cli } +func local_request_Groups_Read_0(ctx context.Context, marshaler runtime.Marshaler, server GroupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReadGroupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Groups_Read_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Read(ctx, &protoReq) + return msg, metadata, err + +} + func request_Groups_Update_0(ctx context.Context, marshaler runtime.Marshaler, client GroupsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateGroupRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Payload); err != nil && err != io.EOF { + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -238,6 +458,41 @@ func request_Groups_Update_0(ctx context.Context, marshaler runtime.Marshaler, c } +func local_request_Groups_Update_0(ctx context.Context, marshaler runtime.Marshaler, server GroupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateGroupRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["payload.id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payload.id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "payload.id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payload.id.resource_id", err) + } + + msg, err := server.Update(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Groups_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "resource_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} ) @@ -264,7 +519,10 @@ func request_Groups_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Groups_Delete_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Groups_Delete_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -273,6 +531,40 @@ func request_Groups_Delete_0(ctx context.Context, marshaler runtime.Marshaler, c } +func local_request_Groups_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server GroupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteGroupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Groups_Delete_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Delete(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Groups_List_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -281,7 +573,10 @@ func request_Groups_List_0(ctx context.Context, marshaler runtime.Marshaler, cli var protoReq ListGroupRequest var metadata runtime.ServerMetadata - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Groups_List_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Groups_List_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -290,11 +585,31 @@ func request_Groups_List_0(ctx context.Context, marshaler runtime.Marshaler, cli } +func local_request_Groups_List_0(ctx context.Context, marshaler runtime.Marshaler, server GroupsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListGroupRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Groups_List_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.List(ctx, &protoReq) + return msg, metadata, err + +} + func request_Contacts_Create_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateContactRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Payload); err != nil && err != io.EOF { + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -303,6 +618,23 @@ func request_Contacts_Create_0(ctx context.Context, marshaler runtime.Marshaler, } +func local_request_Contacts_Create_0(ctx context.Context, marshaler runtime.Marshaler, server ContactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateContactRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Create(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Contacts_Read_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "resource_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} ) @@ -329,135 +661,711 @@ func request_Contacts_Read_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Contacts_Read_0); err != nil { + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Contacts_Read_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } msg, err := client.Read(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err -} +} + +func local_request_Contacts_Read_0(ctx context.Context, marshaler runtime.Marshaler, server ContactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ReadContactRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Contacts_Read_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Read(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Contacts_Update_0 = &utilities.DoubleArray{Encoding: map[string]int{"payload": 0, "id": 1, "resource_id": 2}, Base: []int{1, 2, 1, 1, 0, 0}, Check: []int{0, 1, 2, 3, 4, 2}} +) + +func request_Contacts_Update_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateContactRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["payload.id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payload.id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "payload.id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payload.id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Contacts_Update_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Update(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Contacts_Update_0(ctx context.Context, marshaler runtime.Marshaler, server ContactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateContactRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Payload); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["payload.id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payload.id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "payload.id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payload.id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Contacts_Update_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Update(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Contacts_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "resource_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Contacts_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteContactRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Contacts_Delete_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Contacts_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server ContactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteContactRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id.resource_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id.resource_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "id.resource_id", val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Contacts_Delete_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Delete(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Contacts_List_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Contacts_List_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListContactRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Contacts_List_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.List(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Contacts_List_0(ctx context.Context, marshaler runtime.Marshaler, server ContactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListContactRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Contacts_List_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.List(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Contacts_SendSMS_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SMSRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.SendSMS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Contacts_SendSMS_0(ctx context.Context, marshaler runtime.Marshaler, server ContactsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SMSRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.SendSMS(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterProfilesHandlerServer registers the http handlers for service Profiles to "mux". +// UnaryRPC :call ProfilesServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProfilesHandlerFromEndpoint instead. +func RegisterProfilesHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfilesServer) error { + + mux.Handle("POST", pattern_Profiles_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Profiles_Create_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Profiles_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Profiles_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Profiles_Read_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Profiles_Read_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Profiles_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Profiles_Update_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Profiles_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Profiles_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Profiles_Delete_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Profiles_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Profiles_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Profiles_List_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Profiles_List_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterGroupsHandlerServer registers the http handlers for service Groups to "mux". +// UnaryRPC :call GroupsServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGroupsHandlerFromEndpoint instead. +func RegisterGroupsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GroupsServer) error { + + mux.Handle("POST", pattern_Groups_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Groups_Create_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Groups_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) -var ( - filter_Contacts_Update_0 = &utilities.DoubleArray{Encoding: map[string]int{"payload": 0, "id": 1, "resource_id": 2}, Base: []int{1, 2, 1, 1, 0, 0}, Check: []int{0, 1, 2, 3, 4, 2}} -) + mux.Handle("GET", pattern_Groups_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Groups_Read_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } -func request_Contacts_Update_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateContactRequest - var metadata runtime.ServerMetadata + forward_Groups_Read_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Payload); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } + }) - var ( - val string - ok bool - err error - _ = err - ) + mux.Handle("PUT", pattern_Groups_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Groups_Update_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } - val, ok = pathParams["payload.id.resource_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "payload.id.resource_id") - } + forward_Groups_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - err = runtime.PopulateFieldFromPath(&protoReq, "payload.id.resource_id", val) + }) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "payload.id.resource_id", err) - } + mux.Handle("DELETE", pattern_Groups_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Groups_Delete_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Contacts_Update_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } + forward_Groups_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - msg, err := client.Update(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err + }) -} + mux.Handle("GET", pattern_Groups_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Groups_List_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } -var ( - filter_Contacts_Delete_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0, "resource_id": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} -) + forward_Groups_List_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) -func request_Contacts_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteContactRequest - var metadata runtime.ServerMetadata + }) - var ( - val string - ok bool - err error - _ = err - ) + return nil +} - val, ok = pathParams["id.resource_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id.resource_id") - } +// RegisterContactsHandlerServer registers the http handlers for service Contacts to "mux". +// UnaryRPC :call ContactsServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterContactsHandlerFromEndpoint instead. +func RegisterContactsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ContactsServer) error { - err = runtime.PopulateFieldFromPath(&protoReq, "id.resource_id", val) + mux.Handle("POST", pattern_Contacts_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Contacts_Create_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id.resource_id", err) - } + forward_Contacts_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Contacts_Delete_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } + }) - msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err + mux.Handle("GET", pattern_Contacts_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Contacts_Read_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } -} + forward_Contacts_Read_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) -var ( - filter_Contacts_List_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) + }) -func request_Contacts_List_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListContactRequest - var metadata runtime.ServerMetadata + mux.Handle("PUT", pattern_Contacts_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Contacts_Update_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_Contacts_List_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } + forward_Contacts_Update_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - msg, err := client.List(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err + }) -} + mux.Handle("DELETE", pattern_Contacts_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Contacts_Delete_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } -func request_Contacts_SendSMS_0(ctx context.Context, marshaler runtime.Marshaler, client ContactsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SMSRequest - var metadata runtime.ServerMetadata + forward_Contacts_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } + }) - var ( - val string - ok bool - err error - _ = err - ) + mux.Handle("GET", pattern_Contacts_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Contacts_List_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } + forward_Contacts_List_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - protoReq.Id, err = runtime.Uint64(val) + }) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } + mux.Handle("POST", pattern_Contacts_SendSMS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Contacts_SendSMS_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } - msg, err := client.SendSMS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err + forward_Contacts_SendSMS_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } // RegisterProfilesHandlerFromEndpoint is same as RegisterProfilesHandler but @@ -501,15 +1409,6 @@ func RegisterProfilesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("POST", pattern_Profiles_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -530,15 +1429,6 @@ func RegisterProfilesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("GET", pattern_Profiles_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -559,15 +1449,6 @@ func RegisterProfilesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("PUT", pattern_Profiles_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -588,15 +1469,6 @@ func RegisterProfilesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("DELETE", pattern_Profiles_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -617,15 +1489,6 @@ func RegisterProfilesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("GET", pattern_Profiles_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -647,15 +1510,15 @@ func RegisterProfilesHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } var ( - pattern_Profiles_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"profiles"}, "")) + pattern_Profiles_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"profiles"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Profiles_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"profiles", "id.resource_id"}, "")) + pattern_Profiles_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"profiles", "id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Profiles_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"profiles", "payload.id.resource_id"}, "")) + pattern_Profiles_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"profiles", "payload.id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Profiles_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"profiles", "id.resource_id"}, "")) + pattern_Profiles_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"profiles", "id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Profiles_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"profiles"}, "")) + pattern_Profiles_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"profiles"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -711,15 +1574,6 @@ func RegisterGroupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli mux.Handle("POST", pattern_Groups_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -740,15 +1594,6 @@ func RegisterGroupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli mux.Handle("GET", pattern_Groups_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -769,15 +1614,6 @@ func RegisterGroupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli mux.Handle("PUT", pattern_Groups_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -798,15 +1634,6 @@ func RegisterGroupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli mux.Handle("DELETE", pattern_Groups_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -827,15 +1654,6 @@ func RegisterGroupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli mux.Handle("GET", pattern_Groups_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -857,15 +1675,15 @@ func RegisterGroupsHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli } var ( - pattern_Groups_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"groups"}, "")) + pattern_Groups_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"groups"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Groups_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"groups", "id.resource_id"}, "")) + pattern_Groups_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"groups", "id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Groups_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"groups", "payload.id.resource_id"}, "")) + pattern_Groups_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"groups", "payload.id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Groups_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"groups", "id.resource_id"}, "")) + pattern_Groups_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"groups", "id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Groups_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"groups"}, "")) + pattern_Groups_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"groups"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -921,15 +1739,6 @@ func RegisterContactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("POST", pattern_Contacts_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -950,15 +1759,6 @@ func RegisterContactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("GET", pattern_Contacts_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -979,15 +1779,6 @@ func RegisterContactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("PUT", pattern_Contacts_Update_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -1008,15 +1799,6 @@ func RegisterContactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("DELETE", pattern_Contacts_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -1037,15 +1819,6 @@ func RegisterContactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("GET", pattern_Contacts_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -1066,15 +1839,6 @@ func RegisterContactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c mux.Handle("POST", pattern_Contacts_SendSMS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateContext(ctx, mux, req) if err != nil { @@ -1096,17 +1860,17 @@ func RegisterContactsHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } var ( - pattern_Contacts_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"contacts"}, "")) + pattern_Contacts_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"contacts"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Contacts_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"contacts", "id.resource_id"}, "")) + pattern_Contacts_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"contacts", "id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Contacts_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"contacts", "payload.id.resource_id"}, "")) + pattern_Contacts_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"contacts", "payload.id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Contacts_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"contacts", "id.resource_id"}, "")) + pattern_Contacts_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"contacts", "id.resource_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Contacts_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"contacts"}, "")) + pattern_Contacts_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"contacts"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Contacts_SendSMS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"contacts", "id", "sms"}, "")) + pattern_Contacts_SendSMS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"contacts", "id", "sms"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/pkg/pb/contacts.pb.validate.go b/pkg/pb/contacts.pb.validate.go index c90dbd4..4055df2 100644 --- a/pkg/pb/contacts.pb.validate.go +++ b/pkg/pb/contacts.pb.validate.go @@ -1,6 +1,5 @@ -// Code generated by protoc-gen-validate -// source: pkg/pb/contacts.proto -// DO NOT EDIT!!! +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: github.com/infobloxopen/atlas-contacts-app/pkg/pb/contacts.proto package pb @@ -41,14 +40,12 @@ func (m *Profile) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ProfileValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -60,14 +57,12 @@ func (m *Profile) Validate() error { for idx, item := range m.GetContacts() { _, _ = idx, item - if v, ok := interface{}(item).(interface { - Validate() error - }); ok { + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ProfileValidationError{ - Field: fmt.Sprintf("Contacts[%v]", idx), - Reason: "embedded message failed validation", - Cause: err, + field: fmt.Sprintf("Contacts[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -77,14 +72,12 @@ func (m *Profile) Validate() error { for idx, item := range m.GetGroups() { _, _ = idx, item - if v, ok := interface{}(item).(interface { - Validate() error - }); ok { + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ProfileValidationError{ - Field: fmt.Sprintf("Groups[%v]", idx), - Reason: "embedded message failed validation", - Cause: err, + field: fmt.Sprintf("Groups[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -97,55 +90,55 @@ func (m *Profile) Validate() error { // ProfileValidationError is the validation error returned by Profile.Validate // if the designated constraints aren't met. type ProfileValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ProfileValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ProfileValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ProfileValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ProfileValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ProfileValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ProfileValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ProfileValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ProfileValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ProfileValidationError) GetErrorName() string { return "ProfileValidationError" } +// ErrorName returns error name. +func (e ProfileValidationError) ErrorName() string { return "ProfileValidationError" } // Error satisfies the builtin error interface func (e ProfileValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sProfile.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ProfileValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ProfileValidationError{} // Validate checks the field values on CreateProfileRequest with the rules @@ -156,14 +149,12 @@ func (m *CreateProfileRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetPayload()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPayload()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CreateProfileRequestValidationError{ - Field: "Payload", - Reason: "embedded message failed validation", - Cause: err, + field: "Payload", + reason: "embedded message failed validation", + cause: err, } } } @@ -174,57 +165,57 @@ func (m *CreateProfileRequest) Validate() error { // CreateProfileRequestValidationError is the validation error returned by // CreateProfileRequest.Validate if the designated constraints aren't met. type CreateProfileRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e CreateProfileRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e CreateProfileRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e CreateProfileRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e CreateProfileRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e CreateProfileRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e CreateProfileRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e CreateProfileRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e CreateProfileRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e CreateProfileRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e CreateProfileRequestValidationError) ErrorName() string { return "CreateProfileRequestValidationError" } // Error satisfies the builtin error interface func (e CreateProfileRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCreateProfileRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = CreateProfileRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = CreateProfileRequestValidationError{} // Validate checks the field values on CreateProfileResponse with the rules @@ -235,14 +226,12 @@ func (m *CreateProfileResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CreateProfileResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -253,57 +242,57 @@ func (m *CreateProfileResponse) Validate() error { // CreateProfileResponseValidationError is the validation error returned by // CreateProfileResponse.Validate if the designated constraints aren't met. type CreateProfileResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e CreateProfileResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e CreateProfileResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e CreateProfileResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e CreateProfileResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e CreateProfileResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e CreateProfileResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e CreateProfileResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e CreateProfileResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e CreateProfileResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e CreateProfileResponseValidationError) ErrorName() string { return "CreateProfileResponseValidationError" } // Error satisfies the builtin error interface func (e CreateProfileResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCreateProfileResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = CreateProfileResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = CreateProfileResponseValidationError{} // Validate checks the field values on ReadProfileRequest with the rules @@ -314,14 +303,12 @@ func (m *ReadProfileRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ReadProfileRequestValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -332,57 +319,57 @@ func (m *ReadProfileRequest) Validate() error { // ReadProfileRequestValidationError is the validation error returned by // ReadProfileRequest.Validate if the designated constraints aren't met. type ReadProfileRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ReadProfileRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ReadProfileRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ReadProfileRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ReadProfileRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ReadProfileRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ReadProfileRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ReadProfileRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ReadProfileRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ReadProfileRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ReadProfileRequestValidationError) ErrorName() string { return "ReadProfileRequestValidationError" } // Error satisfies the builtin error interface func (e ReadProfileRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sReadProfileRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ReadProfileRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ReadProfileRequestValidationError{} // Validate checks the field values on ReadProfileResponse with the rules @@ -393,14 +380,12 @@ func (m *ReadProfileResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ReadProfileResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -411,57 +396,57 @@ func (m *ReadProfileResponse) Validate() error { // ReadProfileResponseValidationError is the validation error returned by // ReadProfileResponse.Validate if the designated constraints aren't met. type ReadProfileResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ReadProfileResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ReadProfileResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ReadProfileResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ReadProfileResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ReadProfileResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ReadProfileResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ReadProfileResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ReadProfileResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ReadProfileResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ReadProfileResponseValidationError) ErrorName() string { return "ReadProfileResponseValidationError" } // Error satisfies the builtin error interface func (e ReadProfileResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sReadProfileResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ReadProfileResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ReadProfileResponseValidationError{} // Validate checks the field values on UpdateProfileRequest with the rules @@ -472,14 +457,12 @@ func (m *UpdateProfileRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetPayload()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPayload()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateProfileRequestValidationError{ - Field: "Payload", - Reason: "embedded message failed validation", - Cause: err, + field: "Payload", + reason: "embedded message failed validation", + cause: err, } } } @@ -490,57 +473,57 @@ func (m *UpdateProfileRequest) Validate() error { // UpdateProfileRequestValidationError is the validation error returned by // UpdateProfileRequest.Validate if the designated constraints aren't met. type UpdateProfileRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e UpdateProfileRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e UpdateProfileRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e UpdateProfileRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e UpdateProfileRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e UpdateProfileRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e UpdateProfileRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e UpdateProfileRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e UpdateProfileRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e UpdateProfileRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e UpdateProfileRequestValidationError) ErrorName() string { return "UpdateProfileRequestValidationError" } // Error satisfies the builtin error interface func (e UpdateProfileRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sUpdateProfileRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = UpdateProfileRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = UpdateProfileRequestValidationError{} // Validate checks the field values on UpdateProfileResponse with the rules @@ -551,14 +534,12 @@ func (m *UpdateProfileResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateProfileResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -569,57 +550,57 @@ func (m *UpdateProfileResponse) Validate() error { // UpdateProfileResponseValidationError is the validation error returned by // UpdateProfileResponse.Validate if the designated constraints aren't met. type UpdateProfileResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e UpdateProfileResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e UpdateProfileResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e UpdateProfileResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e UpdateProfileResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e UpdateProfileResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e UpdateProfileResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e UpdateProfileResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e UpdateProfileResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e UpdateProfileResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e UpdateProfileResponseValidationError) ErrorName() string { return "UpdateProfileResponseValidationError" } // Error satisfies the builtin error interface func (e UpdateProfileResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sUpdateProfileResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = UpdateProfileResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = UpdateProfileResponseValidationError{} // Validate checks the field values on DeleteProfileRequest with the rules @@ -630,14 +611,12 @@ func (m *DeleteProfileRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeleteProfileRequestValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -648,57 +627,57 @@ func (m *DeleteProfileRequest) Validate() error { // DeleteProfileRequestValidationError is the validation error returned by // DeleteProfileRequest.Validate if the designated constraints aren't met. type DeleteProfileRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e DeleteProfileRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e DeleteProfileRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e DeleteProfileRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e DeleteProfileRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e DeleteProfileRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e DeleteProfileRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e DeleteProfileRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e DeleteProfileRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e DeleteProfileRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e DeleteProfileRequestValidationError) ErrorName() string { return "DeleteProfileRequestValidationError" } // Error satisfies the builtin error interface func (e DeleteProfileRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sDeleteProfileRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = DeleteProfileRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = DeleteProfileRequestValidationError{} // Validate checks the field values on DeleteProfileResponse with the rules @@ -715,57 +694,57 @@ func (m *DeleteProfileResponse) Validate() error { // DeleteProfileResponseValidationError is the validation error returned by // DeleteProfileResponse.Validate if the designated constraints aren't met. type DeleteProfileResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e DeleteProfileResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e DeleteProfileResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e DeleteProfileResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e DeleteProfileResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e DeleteProfileResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e DeleteProfileResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e DeleteProfileResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e DeleteProfileResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e DeleteProfileResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e DeleteProfileResponseValidationError) ErrorName() string { return "DeleteProfileResponseValidationError" } // Error satisfies the builtin error interface func (e DeleteProfileResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sDeleteProfileResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = DeleteProfileResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = DeleteProfileResponseValidationError{} // Validate checks the field values on ListProfileRequest with the rules @@ -776,50 +755,42 @@ func (m *ListProfileRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetFilter()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListProfileRequestValidationError{ - Field: "Filter", - Reason: "embedded message failed validation", - Cause: err, + field: "Filter", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetOrderBy()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetOrderBy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListProfileRequestValidationError{ - Field: "OrderBy", - Reason: "embedded message failed validation", - Cause: err, + field: "OrderBy", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetFields()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetFields()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListProfileRequestValidationError{ - Field: "Fields", - Reason: "embedded message failed validation", - Cause: err, + field: "Fields", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetPaging()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPaging()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListProfileRequestValidationError{ - Field: "Paging", - Reason: "embedded message failed validation", - Cause: err, + field: "Paging", + reason: "embedded message failed validation", + cause: err, } } } @@ -830,57 +801,57 @@ func (m *ListProfileRequest) Validate() error { // ListProfileRequestValidationError is the validation error returned by // ListProfileRequest.Validate if the designated constraints aren't met. type ListProfileRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ListProfileRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ListProfileRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ListProfileRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ListProfileRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ListProfileRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ListProfileRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ListProfileRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ListProfileRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ListProfileRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ListProfileRequestValidationError) ErrorName() string { return "ListProfileRequestValidationError" } // Error satisfies the builtin error interface func (e ListProfileRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sListProfileRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ListProfileRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ListProfileRequestValidationError{} // Validate checks the field values on ListProfilesResponse with the rules @@ -894,14 +865,12 @@ func (m *ListProfilesResponse) Validate() error { for idx, item := range m.GetResults() { _, _ = idx, item - if v, ok := interface{}(item).(interface { - Validate() error - }); ok { + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListProfilesResponseValidationError{ - Field: fmt.Sprintf("Results[%v]", idx), - Reason: "embedded message failed validation", - Cause: err, + field: fmt.Sprintf("Results[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -914,57 +883,57 @@ func (m *ListProfilesResponse) Validate() error { // ListProfilesResponseValidationError is the validation error returned by // ListProfilesResponse.Validate if the designated constraints aren't met. type ListProfilesResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ListProfilesResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ListProfilesResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ListProfilesResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ListProfilesResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ListProfilesResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ListProfilesResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ListProfilesResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ListProfilesResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ListProfilesResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ListProfilesResponseValidationError) ErrorName() string { return "ListProfilesResponseValidationError" } // Error satisfies the builtin error interface func (e ListProfilesResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sListProfilesResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ListProfilesResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ListProfilesResponseValidationError{} // Validate checks the field values on Group with the rules defined in the @@ -974,14 +943,12 @@ func (m *Group) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GroupValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -990,14 +957,12 @@ func (m *Group) Validate() error { // no validation rules for Notes - if v, ok := interface{}(m.GetProfileId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetProfileId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GroupValidationError{ - Field: "ProfileId", - Reason: "embedded message failed validation", - Cause: err, + field: "ProfileId", + reason: "embedded message failed validation", + cause: err, } } } @@ -1005,14 +970,12 @@ func (m *Group) Validate() error { for idx, item := range m.GetContacts() { _, _ = idx, item - if v, ok := interface{}(item).(interface { - Validate() error - }); ok { + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return GroupValidationError{ - Field: fmt.Sprintf("Contacts[%v]", idx), - Reason: "embedded message failed validation", - Cause: err, + field: fmt.Sprintf("Contacts[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -1025,55 +988,55 @@ func (m *Group) Validate() error { // GroupValidationError is the validation error returned by Group.Validate if // the designated constraints aren't met. type GroupValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e GroupValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e GroupValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e GroupValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e GroupValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e GroupValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e GroupValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e GroupValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e GroupValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e GroupValidationError) GetErrorName() string { return "GroupValidationError" } +// ErrorName returns error name. +func (e GroupValidationError) ErrorName() string { return "GroupValidationError" } // Error satisfies the builtin error interface func (e GroupValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sGroup.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = GroupValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = GroupValidationError{} // Validate checks the field values on CreateGroupRequest with the rules @@ -1084,14 +1047,12 @@ func (m *CreateGroupRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetPayload()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPayload()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CreateGroupRequestValidationError{ - Field: "Payload", - Reason: "embedded message failed validation", - Cause: err, + field: "Payload", + reason: "embedded message failed validation", + cause: err, } } } @@ -1102,57 +1063,57 @@ func (m *CreateGroupRequest) Validate() error { // CreateGroupRequestValidationError is the validation error returned by // CreateGroupRequest.Validate if the designated constraints aren't met. type CreateGroupRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e CreateGroupRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e CreateGroupRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e CreateGroupRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e CreateGroupRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e CreateGroupRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e CreateGroupRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e CreateGroupRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e CreateGroupRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e CreateGroupRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e CreateGroupRequestValidationError) ErrorName() string { return "CreateGroupRequestValidationError" } // Error satisfies the builtin error interface func (e CreateGroupRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCreateGroupRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = CreateGroupRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = CreateGroupRequestValidationError{} // Validate checks the field values on CreateGroupResponse with the rules @@ -1163,14 +1124,12 @@ func (m *CreateGroupResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CreateGroupResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -1181,57 +1140,57 @@ func (m *CreateGroupResponse) Validate() error { // CreateGroupResponseValidationError is the validation error returned by // CreateGroupResponse.Validate if the designated constraints aren't met. type CreateGroupResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e CreateGroupResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e CreateGroupResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e CreateGroupResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e CreateGroupResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e CreateGroupResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e CreateGroupResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e CreateGroupResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e CreateGroupResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e CreateGroupResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e CreateGroupResponseValidationError) ErrorName() string { return "CreateGroupResponseValidationError" } // Error satisfies the builtin error interface func (e CreateGroupResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCreateGroupResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = CreateGroupResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = CreateGroupResponseValidationError{} // Validate checks the field values on ReadGroupRequest with the rules defined @@ -1242,14 +1201,12 @@ func (m *ReadGroupRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ReadGroupRequestValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -1260,57 +1217,55 @@ func (m *ReadGroupRequest) Validate() error { // ReadGroupRequestValidationError is the validation error returned by // ReadGroupRequest.Validate if the designated constraints aren't met. type ReadGroupRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ReadGroupRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ReadGroupRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ReadGroupRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ReadGroupRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ReadGroupRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ReadGroupRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ReadGroupRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ReadGroupRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ReadGroupRequestValidationError) GetErrorName() string { - return "ReadGroupRequestValidationError" -} +// ErrorName returns error name. +func (e ReadGroupRequestValidationError) ErrorName() string { return "ReadGroupRequestValidationError" } // Error satisfies the builtin error interface func (e ReadGroupRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sReadGroupRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ReadGroupRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ReadGroupRequestValidationError{} // Validate checks the field values on ReadGroupResponse with the rules defined @@ -1321,14 +1276,12 @@ func (m *ReadGroupResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ReadGroupResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -1339,57 +1292,57 @@ func (m *ReadGroupResponse) Validate() error { // ReadGroupResponseValidationError is the validation error returned by // ReadGroupResponse.Validate if the designated constraints aren't met. type ReadGroupResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ReadGroupResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ReadGroupResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ReadGroupResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ReadGroupResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ReadGroupResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ReadGroupResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ReadGroupResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ReadGroupResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ReadGroupResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ReadGroupResponseValidationError) ErrorName() string { return "ReadGroupResponseValidationError" } // Error satisfies the builtin error interface func (e ReadGroupResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sReadGroupResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ReadGroupResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ReadGroupResponseValidationError{} // Validate checks the field values on UpdateGroupRequest with the rules @@ -1400,14 +1353,12 @@ func (m *UpdateGroupRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetPayload()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPayload()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateGroupRequestValidationError{ - Field: "Payload", - Reason: "embedded message failed validation", - Cause: err, + field: "Payload", + reason: "embedded message failed validation", + cause: err, } } } @@ -1418,57 +1369,57 @@ func (m *UpdateGroupRequest) Validate() error { // UpdateGroupRequestValidationError is the validation error returned by // UpdateGroupRequest.Validate if the designated constraints aren't met. type UpdateGroupRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e UpdateGroupRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e UpdateGroupRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e UpdateGroupRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e UpdateGroupRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e UpdateGroupRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e UpdateGroupRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e UpdateGroupRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e UpdateGroupRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e UpdateGroupRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e UpdateGroupRequestValidationError) ErrorName() string { return "UpdateGroupRequestValidationError" } // Error satisfies the builtin error interface func (e UpdateGroupRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sUpdateGroupRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = UpdateGroupRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = UpdateGroupRequestValidationError{} // Validate checks the field values on UpdateGroupResponse with the rules @@ -1479,14 +1430,12 @@ func (m *UpdateGroupResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateGroupResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -1497,57 +1446,57 @@ func (m *UpdateGroupResponse) Validate() error { // UpdateGroupResponseValidationError is the validation error returned by // UpdateGroupResponse.Validate if the designated constraints aren't met. type UpdateGroupResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e UpdateGroupResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e UpdateGroupResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e UpdateGroupResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e UpdateGroupResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e UpdateGroupResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e UpdateGroupResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e UpdateGroupResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e UpdateGroupResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e UpdateGroupResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e UpdateGroupResponseValidationError) ErrorName() string { return "UpdateGroupResponseValidationError" } // Error satisfies the builtin error interface func (e UpdateGroupResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sUpdateGroupResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = UpdateGroupResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = UpdateGroupResponseValidationError{} // Validate checks the field values on DeleteGroupRequest with the rules @@ -1558,14 +1507,12 @@ func (m *DeleteGroupRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeleteGroupRequestValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -1576,57 +1523,57 @@ func (m *DeleteGroupRequest) Validate() error { // DeleteGroupRequestValidationError is the validation error returned by // DeleteGroupRequest.Validate if the designated constraints aren't met. type DeleteGroupRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e DeleteGroupRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e DeleteGroupRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e DeleteGroupRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e DeleteGroupRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e DeleteGroupRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e DeleteGroupRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e DeleteGroupRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e DeleteGroupRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e DeleteGroupRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e DeleteGroupRequestValidationError) ErrorName() string { return "DeleteGroupRequestValidationError" } // Error satisfies the builtin error interface func (e DeleteGroupRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sDeleteGroupRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = DeleteGroupRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = DeleteGroupRequestValidationError{} // Validate checks the field values on DeleteGroupResponse with the rules @@ -1643,57 +1590,57 @@ func (m *DeleteGroupResponse) Validate() error { // DeleteGroupResponseValidationError is the validation error returned by // DeleteGroupResponse.Validate if the designated constraints aren't met. type DeleteGroupResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e DeleteGroupResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e DeleteGroupResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e DeleteGroupResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e DeleteGroupResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e DeleteGroupResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e DeleteGroupResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e DeleteGroupResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e DeleteGroupResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e DeleteGroupResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e DeleteGroupResponseValidationError) ErrorName() string { return "DeleteGroupResponseValidationError" } // Error satisfies the builtin error interface func (e DeleteGroupResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sDeleteGroupResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = DeleteGroupResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = DeleteGroupResponseValidationError{} // Validate checks the field values on ListGroupRequest with the rules defined @@ -1704,50 +1651,42 @@ func (m *ListGroupRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetFilter()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListGroupRequestValidationError{ - Field: "Filter", - Reason: "embedded message failed validation", - Cause: err, + field: "Filter", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetOrderBy()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetOrderBy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListGroupRequestValidationError{ - Field: "OrderBy", - Reason: "embedded message failed validation", - Cause: err, + field: "OrderBy", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetFields()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetFields()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListGroupRequestValidationError{ - Field: "Fields", - Reason: "embedded message failed validation", - Cause: err, + field: "Fields", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetPaging()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPaging()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListGroupRequestValidationError{ - Field: "Paging", - Reason: "embedded message failed validation", - Cause: err, + field: "Paging", + reason: "embedded message failed validation", + cause: err, } } } @@ -1758,57 +1697,55 @@ func (m *ListGroupRequest) Validate() error { // ListGroupRequestValidationError is the validation error returned by // ListGroupRequest.Validate if the designated constraints aren't met. type ListGroupRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ListGroupRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ListGroupRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ListGroupRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ListGroupRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ListGroupRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ListGroupRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ListGroupRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ListGroupRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ListGroupRequestValidationError) GetErrorName() string { - return "ListGroupRequestValidationError" -} +// ErrorName returns error name. +func (e ListGroupRequestValidationError) ErrorName() string { return "ListGroupRequestValidationError" } // Error satisfies the builtin error interface func (e ListGroupRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sListGroupRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ListGroupRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ListGroupRequestValidationError{} // Validate checks the field values on ListGroupsResponse with the rules @@ -1822,14 +1759,12 @@ func (m *ListGroupsResponse) Validate() error { for idx, item := range m.GetResults() { _, _ = idx, item - if v, ok := interface{}(item).(interface { - Validate() error - }); ok { + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListGroupsResponseValidationError{ - Field: fmt.Sprintf("Results[%v]", idx), - Reason: "embedded message failed validation", - Cause: err, + field: fmt.Sprintf("Results[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -1842,57 +1777,57 @@ func (m *ListGroupsResponse) Validate() error { // ListGroupsResponseValidationError is the validation error returned by // ListGroupsResponse.Validate if the designated constraints aren't met. type ListGroupsResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ListGroupsResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ListGroupsResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ListGroupsResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ListGroupsResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ListGroupsResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ListGroupsResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ListGroupsResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ListGroupsResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ListGroupsResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ListGroupsResponseValidationError) ErrorName() string { return "ListGroupsResponseValidationError" } // Error satisfies the builtin error interface func (e ListGroupsResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sListGroupsResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ListGroupsResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ListGroupsResponseValidationError{} // Validate checks the field values on Contact with the rules defined in the @@ -1902,14 +1837,12 @@ func (m *Contact) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ContactValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -1920,65 +1853,51 @@ func (m *Contact) Validate() error { // no validation rules for LastName - if err := m._validateEmail(m.GetPrimaryEmail()); err != nil { - return ContactValidationError{ - Field: "PrimaryEmail", - Reason: "value must be a valid email address", - Cause: err, - } - } + // no validation rules for PrimaryEmail // no validation rules for Notes for idx, item := range m.GetEmails() { _, _ = idx, item - if v, ok := interface{}(item).(interface { - Validate() error - }); ok { + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ContactValidationError{ - Field: fmt.Sprintf("Emails[%v]", idx), - Reason: "embedded message failed validation", - Cause: err, + field: fmt.Sprintf("Emails[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - if v, ok := interface{}(m.GetHomeAddress()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetHomeAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ContactValidationError{ - Field: "HomeAddress", - Reason: "embedded message failed validation", - Cause: err, + field: "HomeAddress", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetWorkAddress()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetWorkAddress()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ContactValidationError{ - Field: "WorkAddress", - Reason: "embedded message failed validation", - Cause: err, + field: "WorkAddress", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetProfileId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetProfileId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ContactValidationError{ - Field: "ProfileId", - Reason: "embedded message failed validation", - Cause: err, + field: "ProfileId", + reason: "embedded message failed validation", + cause: err, } } } @@ -1986,28 +1905,24 @@ func (m *Contact) Validate() error { for idx, item := range m.GetGroups() { _, _ = idx, item - if v, ok := interface{}(item).(interface { - Validate() error - }); ok { + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ContactValidationError{ - Field: fmt.Sprintf("Groups[%v]", idx), - Reason: "embedded message failed validation", - Cause: err, + field: fmt.Sprintf("Groups[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } } - if v, ok := interface{}(m.GetNicknames()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetNicknames()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ContactValidationError{ - Field: "Nicknames", - Reason: "embedded message failed validation", - Cause: err, + field: "Nicknames", + reason: "embedded message failed validation", + cause: err, } } } @@ -2015,108 +1930,58 @@ func (m *Contact) Validate() error { return nil } -func (m *Contact) _validateHostname(host string) error { - s := strings.ToLower(strings.TrimSuffix(host, ".")) - - if len(host) > 253 { - return errors.New("hostname cannot exceed 253 characters") - } - - for _, part := range strings.Split(s, ".") { - if l := len(part); l == 0 || l > 63 { - return errors.New("hostname part must be non-empty and cannot exceed 63 characters") - } - - if part[0] == '-' { - return errors.New("hostname parts cannot begin with hyphens") - } - - if part[len(part)-1] == '-' { - return errors.New("hostname parts cannot end with hyphens") - } - - for _, r := range part { - if (r < 'a' || r > 'z') && (r < '0' || r > '9') && r != '-' { - return fmt.Errorf("hostname parts can only contain alphanumeric characters or hyphens, got %q", string(r)) - } - } - } - - return nil -} - -func (m *Contact) _validateEmail(addr string) error { - a, err := mail.ParseAddress(addr) - if err != nil { - return err - } - addr = a.Address - - if len(addr) > 254 { - return errors.New("email addresses cannot exceed 254 characters") - } - - parts := strings.SplitN(addr, "@", 2) - - if len(parts[0]) > 64 { - return errors.New("email address local phrase cannot exceed 64 characters") - } - - return m._validateHostname(parts[1]) -} - // ContactValidationError is the validation error returned by Contact.Validate // if the designated constraints aren't met. type ContactValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ContactValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ContactValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ContactValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ContactValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ContactValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ContactValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ContactValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ContactValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ContactValidationError) GetErrorName() string { return "ContactValidationError" } +// ErrorName returns error name. +func (e ContactValidationError) ErrorName() string { return "ContactValidationError" } // Error satisfies the builtin error interface func (e ContactValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sContact.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ContactValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ContactValidationError{} // Validate checks the field values on Email with the rules defined in the @@ -2128,119 +1993,63 @@ func (m *Email) Validate() error { // no validation rules for Id - if err := m._validateEmail(m.GetAddress()); err != nil { - return EmailValidationError{ - Field: "Address", - Reason: "value must be a valid email address", - Cause: err, - } - } - - return nil -} - -func (m *Email) _validateHostname(host string) error { - s := strings.ToLower(strings.TrimSuffix(host, ".")) - - if len(host) > 253 { - return errors.New("hostname cannot exceed 253 characters") - } - - for _, part := range strings.Split(s, ".") { - if l := len(part); l == 0 || l > 63 { - return errors.New("hostname part must be non-empty and cannot exceed 63 characters") - } - - if part[0] == '-' { - return errors.New("hostname parts cannot begin with hyphens") - } - - if part[len(part)-1] == '-' { - return errors.New("hostname parts cannot end with hyphens") - } - - for _, r := range part { - if (r < 'a' || r > 'z') && (r < '0' || r > '9') && r != '-' { - return fmt.Errorf("hostname parts can only contain alphanumeric characters or hyphens, got %q", string(r)) - } - } - } + // no validation rules for Address return nil } -func (m *Email) _validateEmail(addr string) error { - a, err := mail.ParseAddress(addr) - if err != nil { - return err - } - addr = a.Address - - if len(addr) > 254 { - return errors.New("email addresses cannot exceed 254 characters") - } - - parts := strings.SplitN(addr, "@", 2) - - if len(parts[0]) > 64 { - return errors.New("email address local phrase cannot exceed 64 characters") - } - - return m._validateHostname(parts[1]) -} - // EmailValidationError is the validation error returned by Email.Validate if // the designated constraints aren't met. type EmailValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e EmailValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e EmailValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e EmailValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e EmailValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e EmailValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e EmailValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e EmailValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e EmailValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e EmailValidationError) GetErrorName() string { return "EmailValidationError" } +// ErrorName returns error name. +func (e EmailValidationError) ErrorName() string { return "EmailValidationError" } // Error satisfies the builtin error interface func (e EmailValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sEmail.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = EmailValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = EmailValidationError{} // Validate checks the field values on Address with the rules defined in the @@ -2266,55 +2075,55 @@ func (m *Address) Validate() error { // AddressValidationError is the validation error returned by Address.Validate // if the designated constraints aren't met. type AddressValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e AddressValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e AddressValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e AddressValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e AddressValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e AddressValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e AddressValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e AddressValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e AddressValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e AddressValidationError) GetErrorName() string { return "AddressValidationError" } +// ErrorName returns error name. +func (e AddressValidationError) ErrorName() string { return "AddressValidationError" } // Error satisfies the builtin error interface func (e AddressValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sAddress.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = AddressValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = AddressValidationError{} // Validate checks the field values on CreateContactRequest with the rules @@ -2325,14 +2134,12 @@ func (m *CreateContactRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetPayload()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPayload()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CreateContactRequestValidationError{ - Field: "Payload", - Reason: "embedded message failed validation", - Cause: err, + field: "Payload", + reason: "embedded message failed validation", + cause: err, } } } @@ -2343,57 +2150,57 @@ func (m *CreateContactRequest) Validate() error { // CreateContactRequestValidationError is the validation error returned by // CreateContactRequest.Validate if the designated constraints aren't met. type CreateContactRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e CreateContactRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e CreateContactRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e CreateContactRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e CreateContactRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e CreateContactRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e CreateContactRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e CreateContactRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e CreateContactRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e CreateContactRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e CreateContactRequestValidationError) ErrorName() string { return "CreateContactRequestValidationError" } // Error satisfies the builtin error interface func (e CreateContactRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCreateContactRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = CreateContactRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = CreateContactRequestValidationError{} // Validate checks the field values on CreateContactResponse with the rules @@ -2404,14 +2211,12 @@ func (m *CreateContactResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return CreateContactResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -2422,57 +2227,57 @@ func (m *CreateContactResponse) Validate() error { // CreateContactResponseValidationError is the validation error returned by // CreateContactResponse.Validate if the designated constraints aren't met. type CreateContactResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e CreateContactResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e CreateContactResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e CreateContactResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e CreateContactResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e CreateContactResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e CreateContactResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e CreateContactResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e CreateContactResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e CreateContactResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e CreateContactResponseValidationError) ErrorName() string { return "CreateContactResponseValidationError" } // Error satisfies the builtin error interface func (e CreateContactResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sCreateContactResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = CreateContactResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = CreateContactResponseValidationError{} // Validate checks the field values on ReadContactRequest with the rules @@ -2483,14 +2288,12 @@ func (m *ReadContactRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ReadContactRequestValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -2501,57 +2304,57 @@ func (m *ReadContactRequest) Validate() error { // ReadContactRequestValidationError is the validation error returned by // ReadContactRequest.Validate if the designated constraints aren't met. type ReadContactRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ReadContactRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ReadContactRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ReadContactRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ReadContactRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ReadContactRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ReadContactRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ReadContactRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ReadContactRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ReadContactRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ReadContactRequestValidationError) ErrorName() string { return "ReadContactRequestValidationError" } // Error satisfies the builtin error interface func (e ReadContactRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sReadContactRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ReadContactRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ReadContactRequestValidationError{} // Validate checks the field values on ReadContactResponse with the rules @@ -2562,14 +2365,12 @@ func (m *ReadContactResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ReadContactResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -2580,57 +2381,57 @@ func (m *ReadContactResponse) Validate() error { // ReadContactResponseValidationError is the validation error returned by // ReadContactResponse.Validate if the designated constraints aren't met. type ReadContactResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ReadContactResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ReadContactResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ReadContactResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ReadContactResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ReadContactResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ReadContactResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ReadContactResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ReadContactResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ReadContactResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ReadContactResponseValidationError) ErrorName() string { return "ReadContactResponseValidationError" } // Error satisfies the builtin error interface func (e ReadContactResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sReadContactResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ReadContactResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ReadContactResponseValidationError{} // Validate checks the field values on UpdateContactRequest with the rules @@ -2641,26 +2442,22 @@ func (m *UpdateContactRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetPayload()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPayload()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateContactRequestValidationError{ - Field: "Payload", - Reason: "embedded message failed validation", - Cause: err, + field: "Payload", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetFields()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetFields()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateContactRequestValidationError{ - Field: "Fields", - Reason: "embedded message failed validation", - Cause: err, + field: "Fields", + reason: "embedded message failed validation", + cause: err, } } } @@ -2671,57 +2468,57 @@ func (m *UpdateContactRequest) Validate() error { // UpdateContactRequestValidationError is the validation error returned by // UpdateContactRequest.Validate if the designated constraints aren't met. type UpdateContactRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e UpdateContactRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e UpdateContactRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e UpdateContactRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e UpdateContactRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e UpdateContactRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e UpdateContactRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e UpdateContactRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e UpdateContactRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e UpdateContactRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e UpdateContactRequestValidationError) ErrorName() string { return "UpdateContactRequestValidationError" } // Error satisfies the builtin error interface func (e UpdateContactRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sUpdateContactRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = UpdateContactRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = UpdateContactRequestValidationError{} // Validate checks the field values on UpdateContactResponse with the rules @@ -2732,14 +2529,12 @@ func (m *UpdateContactResponse) Validate() error { return nil } - if v, ok := interface{}(m.GetResult()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return UpdateContactResponseValidationError{ - Field: "Result", - Reason: "embedded message failed validation", - Cause: err, + field: "Result", + reason: "embedded message failed validation", + cause: err, } } } @@ -2750,57 +2545,57 @@ func (m *UpdateContactResponse) Validate() error { // UpdateContactResponseValidationError is the validation error returned by // UpdateContactResponse.Validate if the designated constraints aren't met. type UpdateContactResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e UpdateContactResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e UpdateContactResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e UpdateContactResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e UpdateContactResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e UpdateContactResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e UpdateContactResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e UpdateContactResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e UpdateContactResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e UpdateContactResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e UpdateContactResponseValidationError) ErrorName() string { return "UpdateContactResponseValidationError" } // Error satisfies the builtin error interface func (e UpdateContactResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sUpdateContactResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = UpdateContactResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = UpdateContactResponseValidationError{} // Validate checks the field values on DeleteContactRequest with the rules @@ -2811,14 +2606,12 @@ func (m *DeleteContactRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetId()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return DeleteContactRequestValidationError{ - Field: "Id", - Reason: "embedded message failed validation", - Cause: err, + field: "Id", + reason: "embedded message failed validation", + cause: err, } } } @@ -2829,57 +2622,57 @@ func (m *DeleteContactRequest) Validate() error { // DeleteContactRequestValidationError is the validation error returned by // DeleteContactRequest.Validate if the designated constraints aren't met. type DeleteContactRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e DeleteContactRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e DeleteContactRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e DeleteContactRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e DeleteContactRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e DeleteContactRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e DeleteContactRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e DeleteContactRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e DeleteContactRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e DeleteContactRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e DeleteContactRequestValidationError) ErrorName() string { return "DeleteContactRequestValidationError" } // Error satisfies the builtin error interface func (e DeleteContactRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sDeleteContactRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = DeleteContactRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = DeleteContactRequestValidationError{} // Validate checks the field values on DeleteContactResponse with the rules @@ -2896,57 +2689,57 @@ func (m *DeleteContactResponse) Validate() error { // DeleteContactResponseValidationError is the validation error returned by // DeleteContactResponse.Validate if the designated constraints aren't met. type DeleteContactResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e DeleteContactResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e DeleteContactResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e DeleteContactResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e DeleteContactResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e DeleteContactResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e DeleteContactResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e DeleteContactResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e DeleteContactResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e DeleteContactResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e DeleteContactResponseValidationError) ErrorName() string { return "DeleteContactResponseValidationError" } // Error satisfies the builtin error interface func (e DeleteContactResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sDeleteContactResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = DeleteContactResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = DeleteContactResponseValidationError{} // Validate checks the field values on ListContactsResponse with the rules @@ -2960,14 +2753,12 @@ func (m *ListContactsResponse) Validate() error { for idx, item := range m.GetResults() { _, _ = idx, item - if v, ok := interface{}(item).(interface { - Validate() error - }); ok { + if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListContactsResponseValidationError{ - Field: fmt.Sprintf("Results[%v]", idx), - Reason: "embedded message failed validation", - Cause: err, + field: fmt.Sprintf("Results[%v]", idx), + reason: "embedded message failed validation", + cause: err, } } } @@ -2980,57 +2771,57 @@ func (m *ListContactsResponse) Validate() error { // ListContactsResponseValidationError is the validation error returned by // ListContactsResponse.Validate if the designated constraints aren't met. type ListContactsResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ListContactsResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ListContactsResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ListContactsResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ListContactsResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ListContactsResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ListContactsResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ListContactsResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ListContactsResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ListContactsResponseValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ListContactsResponseValidationError) ErrorName() string { return "ListContactsResponseValidationError" } // Error satisfies the builtin error interface func (e ListContactsResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sListContactsResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ListContactsResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ListContactsResponseValidationError{} // Validate checks the field values on SMSRequest with the rules defined in the @@ -3050,55 +2841,55 @@ func (m *SMSRequest) Validate() error { // SMSRequestValidationError is the validation error returned by // SMSRequest.Validate if the designated constraints aren't met. type SMSRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e SMSRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e SMSRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e SMSRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e SMSRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e SMSRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e SMSRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e SMSRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e SMSRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e SMSRequestValidationError) GetErrorName() string { return "SMSRequestValidationError" } +// ErrorName returns error name. +func (e SMSRequestValidationError) ErrorName() string { return "SMSRequestValidationError" } // Error satisfies the builtin error interface func (e SMSRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSMSRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = SMSRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = SMSRequestValidationError{} // Validate checks the field values on SMSResponse with the rules defined in @@ -3115,55 +2906,55 @@ func (m *SMSResponse) Validate() error { // SMSResponseValidationError is the validation error returned by // SMSResponse.Validate if the designated constraints aren't met. type SMSResponseValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e SMSResponseValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e SMSResponseValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e SMSResponseValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e SMSResponseValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e SMSResponseValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e SMSResponseValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e SMSResponseValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e SMSResponseValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e SMSResponseValidationError) GetErrorName() string { return "SMSResponseValidationError" } +// ErrorName returns error name. +func (e SMSResponseValidationError) ErrorName() string { return "SMSResponseValidationError" } // Error satisfies the builtin error interface func (e SMSResponseValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sSMSResponse.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = SMSResponseValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = SMSResponseValidationError{} // Validate checks the field values on ListContactRequest with the rules @@ -3174,50 +2965,42 @@ func (m *ListContactRequest) Validate() error { return nil } - if v, ok := interface{}(m.GetFilter()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListContactRequestValidationError{ - Field: "Filter", - Reason: "embedded message failed validation", - Cause: err, + field: "Filter", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetOrderBy()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetOrderBy()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListContactRequestValidationError{ - Field: "OrderBy", - Reason: "embedded message failed validation", - Cause: err, + field: "OrderBy", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetFields()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetFields()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListContactRequestValidationError{ - Field: "Fields", - Reason: "embedded message failed validation", - Cause: err, + field: "Fields", + reason: "embedded message failed validation", + cause: err, } } } - if v, ok := interface{}(m.GetPaging()).(interface { - Validate() error - }); ok { + if v, ok := interface{}(m.GetPaging()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return ListContactRequestValidationError{ - Field: "Paging", - Reason: "embedded message failed validation", - Cause: err, + field: "Paging", + reason: "embedded message failed validation", + cause: err, } } } @@ -3228,55 +3011,55 @@ func (m *ListContactRequest) Validate() error { // ListContactRequestValidationError is the validation error returned by // ListContactRequest.Validate if the designated constraints aren't met. type ListContactRequestValidationError struct { - Field string - Reason string - Cause error - Key bool + field string + reason string + cause error + key bool } -// GetField function returns Field value. -func (e ListContactRequestValidationError) GetField() string { return e.Field } +// Field function returns field value. +func (e ListContactRequestValidationError) Field() string { return e.field } -// GetReason function returns Reason value. -func (e ListContactRequestValidationError) GetReason() string { return e.Reason } +// Reason function returns reason value. +func (e ListContactRequestValidationError) Reason() string { return e.reason } -// GetCause function returns Cause value. -func (e ListContactRequestValidationError) GetCause() error { return e.Cause } +// Cause function returns cause value. +func (e ListContactRequestValidationError) Cause() error { return e.cause } -// GetKey function returns Key value. -func (e ListContactRequestValidationError) GetKey() bool { return e.Key } +// Key function returns key value. +func (e ListContactRequestValidationError) Key() bool { return e.key } -// GetErrorName returns Error Name value. -func (e ListContactRequestValidationError) GetErrorName() string { +// ErrorName returns error name. +func (e ListContactRequestValidationError) ErrorName() string { return "ListContactRequestValidationError" } // Error satisfies the builtin error interface func (e ListContactRequestValidationError) Error() string { cause := "" - if e.Cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.Cause) + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) } key := "" - if e.Key { + if e.key { key = "key for " } return fmt.Sprintf( "invalid %sListContactRequest.%s: %s%s", key, - e.Field, - e.Reason, + e.field, + e.reason, cause) } var _ error = ListContactRequestValidationError{} var _ interface { - GetField() string - GetReason() string - GetKey() bool - GetCause() error - GetErrorName() string + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string } = ListContactRequestValidationError{} From ad4045c8704b7e71d0032f7584a60edcbd225051 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Fri, 9 Apr 2021 15:23:22 -0500 Subject: [PATCH 3/8] update dependencies --- .travis.yml | 8 +- go.mod | 26 ++++ go.sum | 413 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 440 insertions(+), 7 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/.travis.yml b/.travis.yml index f5ccb05..88527ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,15 +6,9 @@ services: language: go go: - - "1.10" - -env: - - DEP_VERSION="0.4.1" + - "1.16" before_install: - # add dep to the build environment - - curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep - - chmod +x $GOPATH/bin/dep install: # vendor the go dependencies diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..52790d8 --- /dev/null +++ b/go.mod @@ -0,0 +1,26 @@ +module github.com/infobloxopen/atlas-contacts-app + +go 1.16 + +require ( + github.com/bitly/go-simplejson v0.5.0 + github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect + github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible + github.com/gogo/protobuf v1.3.1 // indirect + github.com/golang/protobuf v1.4.3 + github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 + github.com/grpc-ecosystem/grpc-gateway v1.14.6 + github.com/infobloxopen/atlas-app-toolkit v0.24.1 + github.com/infobloxopen/protoc-gen-gorm v0.20.1 + github.com/jinzhu/gorm v1.9.16 + github.com/kr/pretty v0.2.0 // indirect + github.com/lyft/protoc-gen-validate v0.0.13 + github.com/sirupsen/logrus v1.8.0 + golang.org/x/net v0.0.0-20200707034311-ab3426394381 + golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect + golang.org/x/text v0.3.3 // indirect + google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece + google.golang.org/grpc v1.29.1 + google.golang.org/protobuf v1.25.0 // indirect + gopkg.in/yaml.v2 v2.3.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..6684162 --- /dev/null +++ b/go.sum @@ -0,0 +1,413 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.56.0 h1:WRz29PgAsVEyPSDHyk+0fpEkwEFyfhHn+JbksT6gIL4= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +contrib.go.opencensus.io/exporter/ocagent v0.7.0/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM= +github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgrijalva/jwt-go v0.0.0-20180719211823-0b96aaa70776/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible h1:CiQ/hJK0Lsc/2Gm9uMSIe7cFE+h0sbTwHuTGQkIZpio= +github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20180522105215-e9c5d9645c43/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/grpc-gateway v1.4.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.14.6 h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o= +github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/infobloxopen/atlas-app-toolkit v0.0.0-20180810144038-3237ef051031/go.mod h1:DeDerruKrelNyHNhpOsjMzOJb0Qy97CzA5qsloKrZnk= +github.com/infobloxopen/atlas-app-toolkit v0.24.1 h1:32uOgZRDcpUfnBMQCWrx7gn3eUo0HhcZu6YTy1yXpS4= +github.com/infobloxopen/atlas-app-toolkit v0.24.1/go.mod h1:Pv4B9FcLYpli96gl5crQ6+aD/2W3igpss95fk3kWt5c= +github.com/infobloxopen/go-trees v0.0.0-20180608122459-a1e500cde93c/go.mod h1:PcNJqIlcX/dj3DTG/+QQnRvSgTMG6CLpRMjWcv4+J6w= +github.com/infobloxopen/protoc-gen-gorm v0.20.1 h1:xvTsbfUNxk9JIQwrQ/rCGJQxLyyi2IcxCMm3zixZrdE= +github.com/infobloxopen/protoc-gen-gorm v0.20.1/go.mod h1:06fkQkck4VxEgGD8srTeJTMhLf5O0rgnka+9gota0pI= +github.com/infobloxopen/themis v0.0.0-20180709114455-d62bb103665c/go.mod h1:HBjRUK4sZC1j+43qyDUANbgEZCiULauOChUFuW51OZE= +github.com/jinzhu/gorm v1.9.1/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= +github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= +github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= +github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= +github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v0.0.0-20180523175426-90697d60dd84/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.1-0.20200116171513-9eb3fc897d6f h1:GeKe/1r/0LW8inPmRZi6zVInaZcFXiMzTnPyxITwQ8A= +github.com/lib/pq v1.3.1-0.20200116171513-9eb3fc897d6f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= +github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA= +github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= +github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.26.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece h1:1YM0uhfumvoDu9sx8+RyWwTI63zoCQvI23IYFRlvte0= +google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 264a3817b8869022e0a8f24297d2f5c30c96c2b3 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Fri, 9 Apr 2021 15:48:23 -0500 Subject: [PATCH 4/8] update a lot of vendors, remove themis --- Makefile | 11 +- cmd/server/grpc.go | 10 +- cmd/server/main.go | 16 +- go.mod | 14 +- go.sum | 318 ++++++++++++++++++++++++++++++- pkg/pb/contacts.override.gorm.go | 2 +- 6 files changed, 335 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 231f9a3..60e5b14 100644 --- a/Makefile +++ b/Makefile @@ -44,16 +44,17 @@ test: fmt .PHONY: test-with-integration test-with-integration: fmt - @go test $(GO_TEST_FLAGS) -tags=integration $(GO_PACKAGES) + go test $(GO_TEST_FLAGS) -tags=integration $(GO_PACKAGES) .PHONY: docker docker: - @docker build -f $(SERVER_DOCKERFILE) -t $(SERVER_IMAGE):$(IMAGE_VERSION) . - @docker tag $(SERVER_IMAGE):$(IMAGE_VERSION) $(SERVER_IMAGE):latest - @docker image prune -f --filter label=stage=server-intermediate + docker build -f $(SERVER_DOCKERFILE) -t $(SERVER_IMAGE):$(IMAGE_VERSION) . + docker tag $(SERVER_IMAGE):$(IMAGE_VERSION) $(SERVER_IMAGE):latest + docker image prune -f --filter label=stage=server-intermediate + .PHONY: push push: - @docker push $(SERVER_IMAGE) + docker push $(SERVER_IMAGE) .PHONY: protobuf protobuf: diff --git a/cmd/server/grpc.go b/cmd/server/grpc.go index 1ed3801..a4d01bc 100644 --- a/cmd/server/grpc.go +++ b/cmd/server/grpc.go @@ -1,16 +1,16 @@ package main import ( - "github.com/grpc-ecosystem/go-grpc-middleware" - "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" - toolkit_auth "github.com/infobloxopen/atlas-app-toolkit/auth" "github.com/infobloxopen/atlas-app-toolkit/errors" "github.com/infobloxopen/atlas-app-toolkit/errors/mappers/validationerrors" "github.com/infobloxopen/atlas-app-toolkit/gateway" "github.com/infobloxopen/atlas-app-toolkit/requestid" - "github.com/infobloxopen/atlas-contacts-app/cmd" + grpc_opa "github.com/infobloxopen/atlas-authz-middleware/grpc_opa" "github.com/infobloxopen/atlas-contacts-app/pkg/pb" "github.com/infobloxopen/atlas-contacts-app/pkg/svc" + + grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" + grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/postgres" "github.com/sirupsen/logrus" @@ -29,7 +29,7 @@ func NewGRPCServer(logger *logrus.Logger, db *gorm.DB) (*grpc.Server, error) { // add authorization interceptor if authz service address is provided if AuthzAddr != "" { // authorization interceptor - interceptors = append(interceptors, toolkit_auth.UnaryServerInterceptor(AuthzAddr, cmd.ApplicationID)) + interceptors = append(interceptors, grpc_opa.UnaryServerInterceptor("contacts")) } // create new gRPC grpcServer with middleware chain diff --git a/cmd/server/main.go b/cmd/server/main.go index dbfb2a2..af5e7ae 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -1,18 +1,13 @@ package main import ( + "database/sql" "flag" - "net" - - "github.com/jinzhu/gorm" - "github.com/sirupsen/logrus" - "fmt" + "net" "net/http" "time" - "database/sql" - "github.com/infobloxopen/atlas-app-toolkit/gateway" "github.com/infobloxopen/atlas-app-toolkit/gorm/resource" "github.com/infobloxopen/atlas-app-toolkit/health" @@ -20,9 +15,10 @@ import ( "github.com/infobloxopen/atlas-contacts-app/cmd" "github.com/infobloxopen/atlas-contacts-app/pkg/pb" + grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/go-grpc-middleware" - + "github.com/jinzhu/gorm" + "github.com/sirupsen/logrus" "google.golang.org/grpc" ) @@ -137,7 +133,7 @@ func ServeExternal(logger *logrus.Logger) error { gateway.WithGatewayOptions( runtime.WithMetadata(gateway.NewPresenceAnnotator("PUT")), ), - gateway.WithDialOptions( + gateway.WithDialOptions( []grpc.DialOption{grpc.WithInsecure(), grpc.WithUnaryInterceptor( grpc_middleware.ChainUnaryClient( []grpc.UnaryClientInterceptor{gateway.ClientUnaryInterceptor, gateway.PresenceClientInterceptor()}..., diff --git a/go.mod b/go.mod index 52790d8..6ef25a7 100644 --- a/go.mod +++ b/go.mod @@ -9,18 +9,16 @@ require ( github.com/gogo/protobuf v1.3.1 // indirect github.com/golang/protobuf v1.4.3 github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 - github.com/grpc-ecosystem/grpc-gateway v1.14.6 + github.com/grpc-ecosystem/grpc-gateway v1.14.8 github.com/infobloxopen/atlas-app-toolkit v0.24.1 + github.com/infobloxopen/atlas-authz-middleware v0.0.0-20210225225130-c605434fa6f3 github.com/infobloxopen/protoc-gen-gorm v0.20.1 github.com/jinzhu/gorm v1.9.16 github.com/kr/pretty v0.2.0 // indirect github.com/lyft/protoc-gen-validate v0.0.13 github.com/sirupsen/logrus v1.8.0 - golang.org/x/net v0.0.0-20200707034311-ab3426394381 - golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect - golang.org/x/text v0.3.3 // indirect - google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece - google.golang.org/grpc v1.29.1 - google.golang.org/protobuf v1.25.0 // indirect - gopkg.in/yaml.v2 v2.3.0 // indirect + golang.org/x/net v0.0.0-20201209123823-ac852fbbde11 + google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98 + google.golang.org/grpc v1.34.0 + google.golang.org/grpc/examples v0.0.0-20210408231144-1d1bbb55b381 // indirect ) diff --git a/go.sum b/go.sum index 6684162..e6b214c 100644 --- a/go.sum +++ b/go.sum @@ -27,51 +27,115 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= +github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v0.0.0-20180719211823-0b96aaa70776/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible h1:CiQ/hJK0Lsc/2Gm9uMSIe7cFE+h0sbTwHuTGQkIZpio= github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -92,6 +156,7 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -100,6 +165,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -108,23 +174,61 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20180522105215-e9c5d9645c43/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.4.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.14.6 h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= +github.com/grpc-ecosystem/grpc-gateway v1.14.8 h1:hXClj+iFpmLM8i3lkO6i4Psli4P2qObQuQReiII26U8= +github.com/grpc-ecosystem/grpc-gateway v1.14.8/go.mod h1:NZE8t6vs6TnwLL/ITkaK8W3ecMLGAbh2jXTclvpiwYo= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/infobloxopen/atlas-app-toolkit v0.0.0-20180810144038-3237ef051031/go.mod h1:DeDerruKrelNyHNhpOsjMzOJb0Qy97CzA5qsloKrZnk= github.com/infobloxopen/atlas-app-toolkit v0.24.1 h1:32uOgZRDcpUfnBMQCWrx7gn3eUo0HhcZu6YTy1yXpS4= github.com/infobloxopen/atlas-app-toolkit v0.24.1/go.mod h1:Pv4B9FcLYpli96gl5crQ6+aD/2W3igpss95fk3kWt5c= +github.com/infobloxopen/atlas-authz-middleware v0.0.0-20210225225130-c605434fa6f3 h1:kBmYfOQmznzbCpntszK3FF7EDB5uQG/jj41pAg6z+oY= +github.com/infobloxopen/atlas-authz-middleware v0.0.0-20210225225130-c605434fa6f3/go.mod h1:riwi9bmIh40vFSzsouMkogMPkByyp87q/GRkTmiCPTQ= +github.com/infobloxopen/atlas-claims v0.0.0-20201217033352-c116bfcdadb1 h1:9K5hhblnSoZ3IqU+iltyAoeQh1DyJahFm0En7CJP30E= +github.com/infobloxopen/atlas-claims v0.0.0-20201217033352-c116bfcdadb1/go.mod h1:g+7h5kDIUnw2toSkEiDJXOUyECET2U7RK6Jp8xAO59c= github.com/infobloxopen/go-trees v0.0.0-20180608122459-a1e500cde93c/go.mod h1:PcNJqIlcX/dj3DTG/+QQnRvSgTMG6CLpRMjWcv4+J6w= github.com/infobloxopen/protoc-gen-gorm v0.20.1 h1:xvTsbfUNxk9JIQwrQ/rCGJQxLyyi2IcxCMm3zixZrdE= github.com/infobloxopen/protoc-gen-gorm v0.20.1/go.mod h1:06fkQkck4VxEgGD8srTeJTMhLf5O0rgnka+9gota0pI= @@ -137,12 +241,23 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= @@ -154,43 +269,166 @@ github.com/lib/pq v0.0.0-20180523175426-90697d60dd84/go.mod h1:5WUZQaWbwv1U+lTRe github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.1-0.20200116171513-9eb3fc897d6f h1:GeKe/1r/0LW8inPmRZi6zVInaZcFXiMzTnPyxITwQ8A= github.com/lib/pq v1.3.1-0.20200116171513-9eb3fc897d6f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA= github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/open-policy-agent/opa v0.25.2 h1:zTQuUMvB5xkYixKB9LFVbUd7DcUt1jfS0QKTo+/Vfyc= +github.com/open-policy-agent/opa v0.25.2/go.mod h1:iGThTRECCfKQKICueOZkXUi0opN7BR3qiAnIrNHCmlI= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterh/liner v0.0.0-20170211195444-bf27d3ba8e1d/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/wasmerio/go-ext-wasm v0.3.1 h1:G95XP3fE2FszQSwIU+fHPBYzD0Csmd2ef33snQXNA5Q= +github.com/wasmerio/go-ext-wasm v0.3.1/go.mod h1:VGyarTzasuS7k5KhSIGpM3tciSZlkP31Mp9VJTHMMeI= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b h1:vVRagRXf67ESqAb72hG2C/ZwI8NtJF2u2V76EsuOHGY= +github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b/go.mod h1:HptNXiXVDcJjXe9SqMd0v2FsL9f8dz4GnXgltU6q/co= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= @@ -225,18 +463,27 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -246,8 +493,11 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200927032502-5d4f70055728/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11 h1:lwlPPsmjDKK0J6eG6xDWd5XPehI0R024zxjDnw3esPA= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -261,7 +511,15 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -271,10 +529,14 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -284,18 +546,23 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -303,6 +570,7 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -312,6 +580,8 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -319,6 +589,7 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -327,10 +598,13 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20201009032223-96877f285f7e/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -344,6 +618,7 @@ google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.26.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -354,6 +629,7 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -370,19 +646,31 @@ google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece h1:1YM0uhfumvoDu9sx8+RyWwTI63zoCQvI23IYFRlvte0= google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98 h1:LCO0fg4kb6WwkXQXRQQgUYsFeFb5taTX5WAx5O/Vt28= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc/examples v0.0.0-20201209011439-fd32f6a4fefe/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/grpc/examples v0.0.0-20210408231144-1d1bbb55b381 h1:Am/3iTzINpktzkki6VQY0gmcR1PjkiH0oD3a3uV995I= +google.golang.org/grpc/examples v0.0.0-20210408231144-1d1bbb55b381/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -394,14 +682,28 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -411,3 +713,5 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/pkg/pb/contacts.override.gorm.go b/pkg/pb/contacts.override.gorm.go index 5e71add..9a65358 100644 --- a/pkg/pb/contacts.override.gorm.go +++ b/pkg/pb/contacts.override.gorm.go @@ -170,7 +170,7 @@ func (m *ContactsDefaultServer) CustomList(ctx context.Context, in *ListContactR db = db.Joins(join) } } - res, err := DefaultListContact(ctx, db, in) + res, err := DefaultListContact(ctx, db, in.Filter, in.OrderBy, in.Paging, in.Fields) if err != nil { return nil, err } From 7c6aa128f1bb2dda543d586d7279e28255588706 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Fri, 9 Apr 2021 16:40:04 -0500 Subject: [PATCH 5/8] update to toolkit changes from years ago --- cmd/server/grpc.go | 1 + integration/contacts_gateway_test.go | 62 +++++++--------------------- integration/jwt.go | 2 +- integration/main_test.go | 2 +- 4 files changed, 17 insertions(+), 50 deletions(-) diff --git a/cmd/server/grpc.go b/cmd/server/grpc.go index a4d01bc..a86b01a 100644 --- a/cmd/server/grpc.go +++ b/cmd/server/grpc.go @@ -26,6 +26,7 @@ func NewGRPCServer(logger *logrus.Logger, db *gorm.DB) (*grpc.Server, error) { validationerrors.UnaryServerInterceptor(), gateway.UnaryServerInterceptor(), } + // add authorization interceptor if authz service address is provided if AuthzAddr != "" { // authorization interceptor diff --git a/integration/contacts_gateway_test.go b/integration/contacts_gateway_test.go index 8174f17..7f28169 100644 --- a/integration/contacts_gateway_test.go +++ b/integration/contacts_gateway_test.go @@ -4,6 +4,7 @@ package integration import ( "fmt" + "io/ioutil" "net/http" "strings" "testing" @@ -35,57 +36,21 @@ func TestCreateContact_REST(t *testing.T) { if err != nil { t.Fatalf("unable to create contact: %v", err) } - ValidateResponseCode(t, resCreate, http.StatusOK) - createJSON, err := simplejson.NewFromReader(resCreate.Body) - if err != nil { - t.Fatalf("unable to marshal json response: %v", err) + if e := http.StatusOK; resCreate.StatusCode != e { + t.Errorf("got: %d wanted: %d", resCreate.StatusCode, http.StatusOK) } - var tests = []struct { - name string - json *simplejson.Json - expect string - }{ - { - name: "contact first name", - json: createJSON.GetPath("result", "first_name"), - expect: `"Steven"`, - }, - { - name: "contact middle name", - json: createJSON.GetPath("result", "middle_name"), - expect: `"James"`, - }, - { - name: "contact last", - json: createJSON.GetPath("result", "last_name"), - expect: `"McKubernetes"`, - }, - { - name: "contact notes", - json: createJSON.GetPath("result", "notes"), - expect: `"set sail at sunrise"`, - }, - { - name: "contact primary email", - json: createJSON.GetPath("result", "primary_email"), - expect: `"test@test.com"`, - }, - { - name: "contact email list", - json: createJSON.GetPath("result", "emails"), - expect: `[{"address":"test@test.com","id":"1"}]`, - }, - { - name: "success response", - json: createJSON.GetPath("success"), - expect: `{"code":"OK","status":200}`, - }, + + bs, err := ioutil.ReadAll(resCreate.Body) + if err != nil { + t.Fatal(err) } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - ValidateJSONSchema(t, test.json, test.expect) - }) + + e := `{"result":{"emails":[{"address":"test@test.com","id":"1"}],"first_name":"Steven","id":"atlas-contacts-app/contact/1","last_name":"McKubernetes","middle_name":"James","notes":"set sail at sunrise","primary_email":"test@test.com"}}` + + if body := string(bs); e != body { + t.Errorf("got: %s wanted: %s", body, e) } + } // TestReadContact_REST uses the REST gateway to create a new contact and @@ -279,6 +244,7 @@ func ValidateResponseCode(t *testing.T, res *http.Response, expected int) { // ValidateJSONSchema ensures a given json field matches an expcted json // string func ValidateJSONSchema(t *testing.T, json *simplejson.Json, expected string) { + t.Helper() if json == nil { t.Fatalf("validation error: json schema for is nil") } diff --git a/integration/jwt.go b/integration/jwt.go index e8dd8b7..c2acc80 100644 --- a/integration/jwt.go +++ b/integration/jwt.go @@ -64,7 +64,7 @@ func AddDefaultTokenToRequest(req *http.Request) { if err != nil { log.Fatalf("unable to create token") } - AddTokenToRequest("token", token, req) + AddTokenToRequest("Bearer", token, req) } // AddTokenToRequest adds an authorization token to the http request header diff --git a/integration/main_test.go b/integration/main_test.go index e6e898a..eb0c750 100644 --- a/integration/main_test.go +++ b/integration/main_test.go @@ -45,7 +45,7 @@ func TestMain(m *testing.M) { // start the gRPC server; stop processes when finished log.Printf("running the server binary") - closeServer, err := RunBinary("server", "-db", dbTest.GetDSN()) + closeServer, err := RunBinary("server", "-db", dbTest.GetDSN(), "-log", "debug") if err != nil { log.Fatalf("failed to run the server: %v", err) } From 62bf196a2d3b02c512a56e666da8ad146e3d0076 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Fri, 9 Apr 2021 17:09:19 -0500 Subject: [PATCH 6/8] fixed gateway --- integration/profiles_gateway_test.go | 91 ++++++++-------------------- 1 file changed, 25 insertions(+), 66 deletions(-) diff --git a/integration/profiles_gateway_test.go b/integration/profiles_gateway_test.go index caa771b..1233014 100644 --- a/integration/profiles_gateway_test.go +++ b/integration/profiles_gateway_test.go @@ -4,6 +4,7 @@ package integration import ( "fmt" + "io/ioutil" "net/http" "strings" "testing" @@ -31,41 +32,19 @@ func TestCreateProfile_gateway(t *testing.T) { if err != nil { t.Fatalf("unable to create profile: %v", err) } - ValidateResponseCode(t, resCreate, http.StatusOK) - createJSON, err := simplejson.NewFromReader(resCreate.Body) - if err != nil { - t.Fatalf("unable to unmarshal json response: %v", err) + if e := http.StatusOK; resCreate.StatusCode != e { + t.Errorf("got: %d wanted: %d", resCreate.StatusCode, http.StatusOK) } - var tests = []struct { - name string - json *simplejson.Json - expect string - }{ - { - name: "profile id", - json: createJSON.GetPath("result", "id"), - expect: `"atlas-contacts-app/profiles/1"`, - }, - { - name: "profile notes", - json: createJSON.GetPath("result", "notes"), - expect: `"profile for work-related topics"`, - }, - { - name: "profile name", - json: createJSON.GetPath("result", "name"), - expect: `"work"`, - }, - { - name: "success response", - json: createJSON.GetPath("success"), - expect: `{"code":"OK","status":200}`, - }, + + bs, err := ioutil.ReadAll(resCreate.Body) + if err != nil { + t.Fatal(err) } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - ValidateJSONSchema(t, test.json, test.expect) - }) + + e := `{"result":{"id":"atlas-contacts-app/profile/1","name":"work","notes":"profile for work-related topics"}}` + + if body := string(bs); e != body { + t.Errorf("got: %s wanted: %s", body, e) } } @@ -129,11 +108,6 @@ func TestReadProfile_gateway(t *testing.T) { json: readJSON.GetPath("result", "name"), expect: `"personal"`, }, - { - name: "success response", - json: readJSON.GetPath("success"), - expect: `{"code":"OK","status":200}`, - }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { @@ -299,35 +273,20 @@ func TestListProfiles_gateway(t *testing.T) { if err != nil { t.Fatalf("unable to list profiles %v", err) } - ValidateResponseCode(t, resList, http.StatusOK) - listJSON, err := simplejson.NewFromReader(resList.Body) - if err != nil { - t.Fatalf("unable to unmarshal json response: %v", err) + + if e := http.StatusOK; resList.StatusCode != e { + t.Errorf("got: %d wanted: %d", resList.StatusCode, http.StatusOK) } - var tests = []struct { - name string - json *simplejson.Json - expect string - }{ - { - name: "first profile", - json: listJSON.Get("results").GetIndex(0), - expect: `{"id":"atlas-contacts-app/profiles/1","name":"cooking","notes":"profile for cooking projects"}`, - }, - { - name: "second profile", - json: listJSON.Get("results").GetIndex(1), - expect: `{"id":"atlas-contacts-app/profiles/2","name":"family","notes":"profile for family information"}`, - }, - { - name: "success response", - json: listJSON.GetPath("success"), - expect: `{"code":"OK","status":200}`, - }, + + bs, err := ioutil.ReadAll(resList.Body) + if err != nil { + t.Fatal(err) } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - ValidateJSONSchema(t, test.json, test.expect) - }) + + e := `{"results":[{"id":"atlas-contacts-app/profile/1","name":"cooking","notes":"profile for cooking projects"},{"id":"atlas-contacts-app/profile/2","name":"family","notes":"profile for family information"}]}` + + if body := string(bs); e != body { + t.Errorf("got: %s wanted: %s", body, e) } + } From 75803fa962fb746f8669b49b60c42a6f55c51de2 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Fri, 9 Apr 2021 17:09:24 -0500 Subject: [PATCH 7/8] fixed contacts delete --- integration/contacts_gateway_test.go | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/integration/contacts_gateway_test.go b/integration/contacts_gateway_test.go index 7f28169..cec97ed 100644 --- a/integration/contacts_gateway_test.go +++ b/integration/contacts_gateway_test.go @@ -212,23 +212,33 @@ func TestDeleteContact_REST(t *testing.T) { if err != nil { t.Fatalf("unable to get contact id from response json: %v", err) } - id = strings.TrimPrefix(id, fmt.Sprintf("%s/%s/", cmd.ApplicationID, "contacts")) + parts := strings.Split(id, "/") + + path := fmt.Sprintf("http://localhost:8080/v1/contacts/%s", parts[len(parts)-1]) resDelete, err := MakeRequestWithDefaults( http.MethodDelete, - fmt.Sprintf("http://localhost:8080/v1/contacts/%s", id), + path, nil, ) if err != nil { t.Fatalf("unable to delete contact: %v", err) } - ValidateResponseCode(t, resDelete, http.StatusOK) - deleteJSON, err := simplejson.NewFromReader(resDelete.Body) + + if e := http.StatusOK; resDelete.StatusCode != e { + t.Errorf("got: %d wanted: %d", resDelete.StatusCode, http.StatusOK) + } + + bs, err := ioutil.ReadAll(resDelete.Body) if err != nil { - t.Fatalf("unable to marshal json response: %v", err) + t.Fatal(err) } - t.Run("success response", func(t *testing.T) { - ValidateJSONSchema(t, deleteJSON, `{"success":{"code":"OK","status":200}}`) - }) + + e := `{}` + + if body := string(bs); e != body { + t.Errorf("got: %s wanted: %s", body, e) + } + } // ValidateResponseCode checks the http status of a given request and will From 4e5f3cca2b0d5abd6bd22c8cfa026c059407be08 Mon Sep 17 00:00:00 2001 From: Drew Wells Date: Fri, 9 Apr 2021 17:26:29 -0500 Subject: [PATCH 8/8] fix gateway tests --- integration/contacts_gateway_test.go | 10 +---- integration/jwt.go | 2 +- integration/profiles_gateway_test.go | 58 +++++++++------------------- 3 files changed, 21 insertions(+), 49 deletions(-) diff --git a/integration/contacts_gateway_test.go b/integration/contacts_gateway_test.go index cec97ed..c1893bf 100644 --- a/integration/contacts_gateway_test.go +++ b/integration/contacts_gateway_test.go @@ -10,7 +10,6 @@ import ( "testing" "github.com/bitly/go-simplejson" - "github.com/infobloxopen/atlas-contacts-app/cmd" "github.com/infobloxopen/atlas-contacts-app/pkg/pb" ) @@ -83,7 +82,8 @@ func TestReadContact_REST(t *testing.T) { if err != nil { t.Fatalf("unable to get contact id from response json: %v", err) } - id = strings.TrimPrefix(id, fmt.Sprintf("%s/%s/", cmd.ApplicationID, "contacts")) + parts := strings.Split(id, "/") + id = parts[len(parts)-1] resRead, err := MakeRequestWithDefaults( http.MethodGet, fmt.Sprintf("http://localhost:8080/v1/contacts/%s", id), nil, @@ -128,11 +128,6 @@ func TestReadContact_REST(t *testing.T) { json: readJSON.GetPath("result", "emails"), expect: `[{"address":"test@test.com","id":"1"}]`, }, - { - name: "success response", - json: readJSON.GetPath("success"), - expect: `{"code":"OK","status":200}`, - }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { @@ -213,7 +208,6 @@ func TestDeleteContact_REST(t *testing.T) { t.Fatalf("unable to get contact id from response json: %v", err) } parts := strings.Split(id, "/") - path := fmt.Sprintf("http://localhost:8080/v1/contacts/%s", parts[len(parts)-1]) resDelete, err := MakeRequestWithDefaults( http.MethodDelete, diff --git a/integration/jwt.go b/integration/jwt.go index c2acc80..d1b2a6c 100644 --- a/integration/jwt.go +++ b/integration/jwt.go @@ -37,7 +37,7 @@ func DefaultContext(t *testing.T) context.Context { func ContextWithToken(ctx context.Context, token string) context.Context { c := metadata.AppendToOutgoingContext( ctx, - "Authorization", fmt.Sprintf("token %s", token), + "Authorization", fmt.Sprintf("Bearer %s", token), ) return c } diff --git a/integration/profiles_gateway_test.go b/integration/profiles_gateway_test.go index 1233014..79ba48a 100644 --- a/integration/profiles_gateway_test.go +++ b/integration/profiles_gateway_test.go @@ -10,7 +10,6 @@ import ( "testing" simplejson "github.com/bitly/go-simplejson" - "github.com/infobloxopen/atlas-contacts-app/cmd" "github.com/infobloxopen/atlas-contacts-app/pkg/pb" ) @@ -75,7 +74,8 @@ func TestReadProfile_gateway(t *testing.T) { if err != nil { t.Fatalf("unable to get profile id from json response: %v", err) } - id = strings.TrimPrefix(id, fmt.Sprintf("%s/%s/", cmd.ApplicationID, "profiles")) + parts := strings.Split(id, "/") + id = parts[len(parts)-1] resRead, err := MakeRequestWithDefaults( http.MethodGet, fmt.Sprintf("http://localhost:8080/v1/profiles/%s", id), nil, @@ -83,36 +83,18 @@ func TestReadProfile_gateway(t *testing.T) { if err != nil { t.Fatalf("unable to get profile: %v", err) } + ValidateResponseCode(t, resCreate, http.StatusOK) - readJSON, err := simplejson.NewFromReader(resRead.Body) + + bs, err := ioutil.ReadAll(resRead.Body) if err != nil { - t.Fatalf("unable to get profile id from json response: %v", err) - } - var tests = []struct { - name string - json *simplejson.Json - expect string - }{ - { - name: "profile id", - json: readJSON.GetPath("result", "id"), - expect: `"atlas-contacts-app/profiles/1"`, - }, - { - name: "profile notes", - json: readJSON.GetPath("result", "notes"), - expect: `"profile for personal matters"`, - }, - { - name: "profile name", - json: readJSON.GetPath("result", "name"), - expect: `"personal"`, - }, + t.Fatal(err) } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - ValidateJSONSchema(t, test.json, test.expect) - }) + + e := `{"result":{"id":"atlas-contacts-app/profile/1","name":"personal","notes":"profile for personal matters"}}` + + if body := string(bs); e != body { + t.Errorf("got: %s wanted: %s", body, e) } } @@ -144,7 +126,8 @@ func TestUpdateProfile_gateway(t *testing.T) { if err != nil { t.Fatalf("unable to get profile id from json response: %v", err) } - id = strings.TrimPrefix(id, fmt.Sprintf("%s/%s/", cmd.ApplicationID, "profiles")) + parts := strings.Split(id, "/") + id = parts[len(parts)-1] updated := pb.Profile{ Name: "woodworking", Notes: "profile to show my woodworking portfolio", @@ -168,7 +151,7 @@ func TestUpdateProfile_gateway(t *testing.T) { { name: "profile id", json: updateJSON.GetPath("result", "id"), - expect: `"atlas-contacts-app/profiles/1"`, + expect: `"atlas-contacts-app/profile/1"`, }, { name: "profile notes", @@ -180,11 +163,6 @@ func TestUpdateProfile_gateway(t *testing.T) { json: updateJSON.GetPath("result", "name"), expect: `"woodworking"`, }, - { - name: "success response", - json: updateJSON.GetPath("success"), - expect: `{"code":"OK","status":200}`, - }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { @@ -219,7 +197,8 @@ func TestDeleteProfile_gateway(t *testing.T) { if err != nil { t.Fatalf("unable to get profile id from json response: %v", err) } - id = strings.TrimPrefix(id, fmt.Sprintf("%s/%s/", cmd.ApplicationID, "profiles")) + parts := strings.Split(id, "/") + id = parts[len(parts)-1] resDelete, err := MakeRequestWithDefaults( http.MethodDelete, fmt.Sprintf("http://localhost:8080/v1/profiles/%s", id), @@ -233,9 +212,8 @@ func TestDeleteProfile_gateway(t *testing.T) { if err != nil { t.Fatalf("unable to unmarshal json response: %v", err) } - t.Run("success response", func(t *testing.T) { - ValidateJSONSchema(t, deleteJSON, `{"success":{"code":"OK","status":200}}`) - }) + + ValidateJSONSchema(t, deleteJSON, `{}`) } // TestListProfiles_gateway uses the REST gateway to create two profiles and