github.com/ewagmig/fabric@v2.1.1+incompatible/core/policy/mocks/identity.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import fabric_protos_gomsp "github.com/hyperledger/fabric-protos-go/msp"
     6  import mock "github.com/stretchr/testify/mock"
     7  import msp "github.com/hyperledger/fabric/msp"
     8  
     9  import time "time"
    10  
    11  // Identity is an autogenerated mock type for the Identity type
    12  type Identity struct {
    13  	mock.Mock
    14  }
    15  
    16  // Anonymous provides a mock function with given fields:
    17  func (_m *Identity) Anonymous() bool {
    18  	ret := _m.Called()
    19  
    20  	var r0 bool
    21  	if rf, ok := ret.Get(0).(func() bool); ok {
    22  		r0 = rf()
    23  	} else {
    24  		r0 = ret.Get(0).(bool)
    25  	}
    26  
    27  	return r0
    28  }
    29  
    30  // ExpiresAt provides a mock function with given fields:
    31  func (_m *Identity) ExpiresAt() time.Time {
    32  	ret := _m.Called()
    33  
    34  	var r0 time.Time
    35  	if rf, ok := ret.Get(0).(func() time.Time); ok {
    36  		r0 = rf()
    37  	} else {
    38  		r0 = ret.Get(0).(time.Time)
    39  	}
    40  
    41  	return r0
    42  }
    43  
    44  // GetIdentifier provides a mock function with given fields:
    45  func (_m *Identity) GetIdentifier() *msp.IdentityIdentifier {
    46  	ret := _m.Called()
    47  
    48  	var r0 *msp.IdentityIdentifier
    49  	if rf, ok := ret.Get(0).(func() *msp.IdentityIdentifier); ok {
    50  		r0 = rf()
    51  	} else {
    52  		if ret.Get(0) != nil {
    53  			r0 = ret.Get(0).(*msp.IdentityIdentifier)
    54  		}
    55  	}
    56  
    57  	return r0
    58  }
    59  
    60  // GetMSPIdentifier provides a mock function with given fields:
    61  func (_m *Identity) GetMSPIdentifier() string {
    62  	ret := _m.Called()
    63  
    64  	var r0 string
    65  	if rf, ok := ret.Get(0).(func() string); ok {
    66  		r0 = rf()
    67  	} else {
    68  		r0 = ret.Get(0).(string)
    69  	}
    70  
    71  	return r0
    72  }
    73  
    74  // GetOrganizationalUnits provides a mock function with given fields:
    75  func (_m *Identity) GetOrganizationalUnits() []*msp.OUIdentifier {
    76  	ret := _m.Called()
    77  
    78  	var r0 []*msp.OUIdentifier
    79  	if rf, ok := ret.Get(0).(func() []*msp.OUIdentifier); ok {
    80  		r0 = rf()
    81  	} else {
    82  		if ret.Get(0) != nil {
    83  			r0 = ret.Get(0).([]*msp.OUIdentifier)
    84  		}
    85  	}
    86  
    87  	return r0
    88  }
    89  
    90  // SatisfiesPrincipal provides a mock function with given fields: principal
    91  func (_m *Identity) SatisfiesPrincipal(principal *fabric_protos_gomsp.MSPPrincipal) error {
    92  	ret := _m.Called(principal)
    93  
    94  	var r0 error
    95  	if rf, ok := ret.Get(0).(func(*fabric_protos_gomsp.MSPPrincipal) error); ok {
    96  		r0 = rf(principal)
    97  	} else {
    98  		r0 = ret.Error(0)
    99  	}
   100  
   101  	return r0
   102  }
   103  
   104  // Serialize provides a mock function with given fields:
   105  func (_m *Identity) Serialize() ([]byte, error) {
   106  	ret := _m.Called()
   107  
   108  	var r0 []byte
   109  	if rf, ok := ret.Get(0).(func() []byte); ok {
   110  		r0 = rf()
   111  	} else {
   112  		if ret.Get(0) != nil {
   113  			r0 = ret.Get(0).([]byte)
   114  		}
   115  	}
   116  
   117  	var r1 error
   118  	if rf, ok := ret.Get(1).(func() error); ok {
   119  		r1 = rf()
   120  	} else {
   121  		r1 = ret.Error(1)
   122  	}
   123  
   124  	return r0, r1
   125  }
   126  
   127  // Validate provides a mock function with given fields:
   128  func (_m *Identity) Validate() error {
   129  	ret := _m.Called()
   130  
   131  	var r0 error
   132  	if rf, ok := ret.Get(0).(func() error); ok {
   133  		r0 = rf()
   134  	} else {
   135  		r0 = ret.Error(0)
   136  	}
   137  
   138  	return r0
   139  }
   140  
   141  // Verify provides a mock function with given fields: msg, sig
   142  func (_m *Identity) Verify(msg []byte, sig []byte) error {
   143  	ret := _m.Called(msg, sig)
   144  
   145  	var r0 error
   146  	if rf, ok := ret.Get(0).(func([]byte, []byte) error); ok {
   147  		r0 = rf(msg, sig)
   148  	} else {
   149  		r0 = ret.Error(0)
   150  	}
   151  
   152  	return r0
   153  }