This repository was archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathchaincode_owner.validator.pb.go
More file actions
90 lines (86 loc) · 3.13 KB
/
chaincode_owner.validator.pb.go
File metadata and controls
90 lines (86 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: owner/chaincode_owner.proto
package owner
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
_ "google.golang.org/protobuf/types/known/emptypb"
_ "google.golang.org/protobuf/types/known/timestamppb"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *ChaincodeOwners) Validate() error {
for _, item := range this.Items {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
}
}
}
return nil
}
func (this *ChaincodeOwner) Validate() error {
if this.ExpiresAt != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ExpiresAt); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ExpiresAt", err)
}
}
if this.UpdatedAt != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UpdatedAt); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("UpdatedAt", err)
}
}
return nil
}
func (this *CreateOwnerRequest) Validate() error {
if this.MspId == "" {
return github_com_mwitkow_go_proto_validators.FieldError("MspId", fmt.Errorf(`value '%v' must not be an empty string`, this.MspId))
}
if !(len(this.Cert) > 0) {
return github_com_mwitkow_go_proto_validators.FieldError("Cert", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.Cert))
}
return nil
}
func (this *UpdateOwnerRequest) Validate() error {
if this.MspId == "" {
return github_com_mwitkow_go_proto_validators.FieldError("MspId", fmt.Errorf(`value '%v' must not be an empty string`, this.MspId))
}
if !(len(this.Cert) > 0) {
return github_com_mwitkow_go_proto_validators.FieldError("Cert", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.Cert))
}
return nil
}
func (this *OwnerId) Validate() error {
if this.MspId == "" {
return github_com_mwitkow_go_proto_validators.FieldError("MspId", fmt.Errorf(`value '%v' must not be an empty string`, this.MspId))
}
if this.Subject == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Subject", fmt.Errorf(`value '%v' must not be an empty string`, this.Subject))
}
return nil
}
func (this *ChaincodeOwnerCreated) Validate() error {
if this.ExpiresAt != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ExpiresAt); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ExpiresAt", err)
}
}
return nil
}
func (this *ChaincodeOwnerUpdated) Validate() error {
if this.ExpiresAt != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.ExpiresAt); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ExpiresAt", err)
}
}
return nil
}
func (this *ChaincodeOwnerDeleted) Validate() error {
return nil
}