...

Package mocks

import "github.com/hyperledger/fabric-ca/lib/server/idemix/mocks"
Overview
Index

Overview ▾

Code generated by mockery v1.0.0. DO NOT EDIT.

Code generated by mockery v1.0.0. DO NOT EDIT.

Code generated by mockery v1.0.0. DO NOT EDIT.

Code generated by mockery v1.0.0. DO NOT EDIT.

Code generated by mockery v1.0.0. DO NOT EDIT.

Code generated by mockery v1.0.0. DO NOT EDIT.

Code generated by mockery v1.0.0. DO NOT EDIT.

Index ▾

type Clock
    func (_m *Clock) Now() time.Time
type CredDBAccessor
    func (_m *CredDBAccessor) GetCredential(revocationHandle string) (*idemix.CredRecord, error)
    func (_m *CredDBAccessor) GetCredentialsByID(id string) ([]idemix.CredRecord, error)
    func (_m *CredDBAccessor) GetRevokedCredentials() ([]idemix.CredRecord, error)
    func (_m *CredDBAccessor) InsertCredential(cr idemix.CredRecord) error
    func (_m *CredDBAccessor) SetDB(_a0 db.FabricCADB)
type FabricCADB
    func (_m *FabricCADB) BeginTx() db.FabricCATx
    func (_m *FabricCADB) Close() error
    func (_m *FabricCADB) DriverName() string
    func (_m *FabricCADB) Exec(funcName string, query string, args ...interface{}) (sql.Result, error)
    func (_m *FabricCADB) Get(funcName string, dest interface{}, query string, args ...interface{}) error
    func (_m *FabricCADB) IsInitialized() bool
    func (_m *FabricCADB) MustBegin() *sqlx.Tx
    func (_m *FabricCADB) NamedExec(funcName string, query string, arg interface{}) (sql.Result, error)
    func (_m *FabricCADB) PingContext(ctx context.Context) error
    func (_m *FabricCADB) Queryx(funcName string, query string, args ...interface{}) (*sqlx.Rows, error)
    func (_m *FabricCADB) Rebind(query string) string
    func (_m *FabricCADB) Select(funcName string, dest interface{}, query string, args ...interface{}) error
    func (_m *FabricCADB) SetDBInitialized(_a0 bool)
    func (_m *FabricCADB) SetMaxOpenConns(n int)
type FabricCATx
    func (_m *FabricCATx) Commit(funcName string) error
    func (_m *FabricCATx) Exec(funcName string, query string, args ...interface{}) (sql.Result, error)
    func (_m *FabricCATx) Get(funcName string, dest interface{}, query string, args ...interface{}) error
    func (_m *FabricCATx) Queryx(funcName string, query string, args ...interface{}) (*sqlx.Rows, error)
    func (_m *FabricCATx) Rebind(query string) string
    func (_m *FabricCATx) Rollback(funcName string) error
    func (_m *FabricCATx) Select(funcName string, dest interface{}, query string, args ...interface{}) error
type IssuerCredential
    func (_m *IssuerCredential) GetIssuerKey() (*idemix.IssuerKey, error)
    func (_m *IssuerCredential) Load() error
    func (_m *IssuerCredential) NewIssuerKey() (*idemix.IssuerKey, error)
    func (_m *IssuerCredential) SetIssuerKey(key *idemix.IssuerKey)
    func (_m *IssuerCredential) Store() error
type Lib
    func (_m *Lib) CreateCRI(key *ecdsa.PrivateKey, unrevokedHandles []*FP256BN.BIG, epoch int, alg idemix.RevocationAlgorithm, rng *amcl.RAND) (*idemix.CredentialRevocationInformation, error)
    func (_m *Lib) GenerateLongTermRevocationKey() (*ecdsa.PrivateKey, error)
    func (_m *Lib) GetRand() (*amcl.RAND, error)
    func (_m *Lib) NewCredential(key *idemix.IssuerKey, m *idemix.CredRequest, attrs []*FP256BN.BIG, rng *amcl.RAND) (*idemix.Credential, error)
    func (_m *Lib) NewIssuerKey(AttributeNames []string, rng *amcl.RAND) (*idemix.IssuerKey, error)
    func (_m *Lib) RandModOrder(rng *amcl.RAND) (*FP256BN.BIG, error)
type MyIssuer
    func (_m *MyIssuer) Config() *idemix.Config
    func (_m *MyIssuer) CredDBAccessor() idemix.CredDBAccessor
    func (_m *MyIssuer) DB() db.FabricCADB
    func (_m *MyIssuer) HomeDir() string
    func (_m *MyIssuer) IdemixLib() idemix.Lib
    func (_m *MyIssuer) IdemixRand() *amcl.RAND
    func (_m *MyIssuer) IssuerCredential() idemix.IssuerCredential
    func (_m *MyIssuer) Name() string
    func (_m *MyIssuer) NonceManager() idemix.NonceManager
    func (_m *MyIssuer) RevocationAuthority() idemix.RevocationAuthority
type NonceManager
    func (_m *NonceManager) CheckNonce(nonce *FP256BN.BIG) error
    func (_m *NonceManager) GetNonce() (*FP256BN.BIG, error)
    func (_m *NonceManager) SweepExpiredNonces() error
type Result
    func (_m *Result) LastInsertId() (int64, error)
    func (_m *Result) RowsAffected() (int64, error)
type RevocationAuthority
    func (_m *RevocationAuthority) CreateCRI() (*idemix.CredentialRevocationInformation, error)
    func (_m *RevocationAuthority) Epoch() (int, error)
    func (_m *RevocationAuthority) GetNewRevocationHandle() (*FP256BN.BIG, error)
    func (_m *RevocationAuthority) PublicKey() *ecdsa.PublicKey
type ServerRequestCtx
    func (_m *ServerRequestCtx) BasicAuthentication() (string, error)
    func (_m *ServerRequestCtx) GetCaller() (user.User, error)
    func (_m *ServerRequestCtx) IsBasicAuth() bool
    func (_m *ServerRequestCtx) ReadBody(body interface{}) error
    func (_m *ServerRequestCtx) TokenAuthentication() (string, error)
type User
    func (_m *User) GetAffiliationPath() []string
    func (_m *User) GetAttribute(name string) (*api.Attribute, error)
    func (_m *User) GetAttributes(attrNames []string) ([]api.Attribute, error)
    func (_m *User) GetFailedLoginAttempts() int
    func (_m *User) GetLevel() int
    func (_m *User) GetMaxEnrollments() int
    func (_m *User) GetName() string
    func (_m *User) GetType() string
    func (_m *User) IncrementIncorrectPasswordAttempts() error
    func (_m *User) IsRevoked() bool
    func (_m *User) Login(password string, caMaxEnrollment int) error
    func (_m *User) LoginComplete() error
    func (_m *User) ModifyAttributes(attrs []api.Attribute) error
    func (_m *User) Revoke() error
    func (_m *User) SetLevel(level int) error

Package files

Clock.go FabricCATx.go IssuerCredential.go Lib.go NonceManager.go Result.go RevocationAuthority.go User.go cred_db_accessor.go fabric_cadb.go my_issuer.go server_request_ctx.go

type Clock

Clock is an autogenerated mock type for the Clock type

type Clock struct {
    mock.Mock
}

func (*Clock) Now

func (_m *Clock) Now() time.Time

Now provides a mock function with given fields:

type CredDBAccessor

CredDBAccessor is an autogenerated mock type for the CredDBAccessor type

type CredDBAccessor struct {
    mock.Mock
}

func (*CredDBAccessor) GetCredential

func (_m *CredDBAccessor) GetCredential(revocationHandle string) (*idemix.CredRecord, error)

GetCredential provides a mock function with given fields: revocationHandle

func (*CredDBAccessor) GetCredentialsByID

func (_m *CredDBAccessor) GetCredentialsByID(id string) ([]idemix.CredRecord, error)

GetCredentialsByID provides a mock function with given fields: id

func (*CredDBAccessor) GetRevokedCredentials

func (_m *CredDBAccessor) GetRevokedCredentials() ([]idemix.CredRecord, error)

GetRevokedCredentials provides a mock function with given fields:

func (*CredDBAccessor) InsertCredential

func (_m *CredDBAccessor) InsertCredential(cr idemix.CredRecord) error

InsertCredential provides a mock function with given fields: cr

func (*CredDBAccessor) SetDB

func (_m *CredDBAccessor) SetDB(_a0 db.FabricCADB)

SetDB provides a mock function with given fields: _a0

type FabricCADB

FabricCADB is an autogenerated mock type for the FabricCADB type

type FabricCADB struct {
    mock.Mock
}

func (*FabricCADB) BeginTx

func (_m *FabricCADB) BeginTx() db.FabricCATx

BeginTx provides a mock function with given fields:

func (*FabricCADB) Close

func (_m *FabricCADB) Close() error

Close provides a mock function with given fields:

func (*FabricCADB) DriverName

func (_m *FabricCADB) DriverName() string

DriverName provides a mock function with given fields:

func (*FabricCADB) Exec

func (_m *FabricCADB) Exec(funcName string, query string, args ...interface{}) (sql.Result, error)

Exec provides a mock function with given fields: funcName, query, args

func (*FabricCADB) Get

func (_m *FabricCADB) Get(funcName string, dest interface{}, query string, args ...interface{}) error

Get provides a mock function with given fields: funcName, dest, query, args

func (*FabricCADB) IsInitialized

func (_m *FabricCADB) IsInitialized() bool

IsInitialized provides a mock function with given fields:

func (*FabricCADB) MustBegin

func (_m *FabricCADB) MustBegin() *sqlx.Tx

MustBegin provides a mock function with given fields:

func (*FabricCADB) NamedExec

func (_m *FabricCADB) NamedExec(funcName string, query string, arg interface{}) (sql.Result, error)

NamedExec provides a mock function with given fields: funcName, query, arg

func (*FabricCADB) PingContext

func (_m *FabricCADB) PingContext(ctx context.Context) error

PingContext provides a mock function with given fields: ctx

func (*FabricCADB) Queryx

func (_m *FabricCADB) Queryx(funcName string, query string, args ...interface{}) (*sqlx.Rows, error)

Queryx provides a mock function with given fields: funcName, query, args

func (*FabricCADB) Rebind

func (_m *FabricCADB) Rebind(query string) string

Rebind provides a mock function with given fields: query

func (*FabricCADB) Select

func (_m *FabricCADB) Select(funcName string, dest interface{}, query string, args ...interface{}) error

Select provides a mock function with given fields: funcName, dest, query, args

func (*FabricCADB) SetDBInitialized

func (_m *FabricCADB) SetDBInitialized(_a0 bool)

SetDBInitialized provides a mock function with given fields: _a0

func (*FabricCADB) SetMaxOpenConns

func (_m *FabricCADB) SetMaxOpenConns(n int)

SetMaxOpenConns provides a mock function with given fields: n

type FabricCATx

FabricCATx is an autogenerated mock type for the FabricCATx type

type FabricCATx struct {
    mock.Mock
}

func (*FabricCATx) Commit

func (_m *FabricCATx) Commit(funcName string) error

Commit provides a mock function with given fields: funcName

func (*FabricCATx) Exec

func (_m *FabricCATx) Exec(funcName string, query string, args ...interface{}) (sql.Result, error)

Exec provides a mock function with given fields: funcName, query, args

func (*FabricCATx) Get

func (_m *FabricCATx) Get(funcName string, dest interface{}, query string, args ...interface{}) error

Get provides a mock function with given fields: funcName, dest, query, args

func (*FabricCATx) Queryx

func (_m *FabricCATx) Queryx(funcName string, query string, args ...interface{}) (*sqlx.Rows, error)

Queryx provides a mock function with given fields: funcName, query, args

func (*FabricCATx) Rebind

func (_m *FabricCATx) Rebind(query string) string

Rebind provides a mock function with given fields: query

func (*FabricCATx) Rollback

func (_m *FabricCATx) Rollback(funcName string) error

Rollback provides a mock function with given fields: funcName

func (*FabricCATx) Select

func (_m *FabricCATx) Select(funcName string, dest interface{}, query string, args ...interface{}) error

Select provides a mock function with given fields: funcName, dest, query, args

type IssuerCredential

IssuerCredential is an autogenerated mock type for the IssuerCredential type

type IssuerCredential struct {
    mock.Mock
}

func (*IssuerCredential) GetIssuerKey

func (_m *IssuerCredential) GetIssuerKey() (*idemix.IssuerKey, error)

GetIssuerKey provides a mock function with given fields:

func (*IssuerCredential) Load

func (_m *IssuerCredential) Load() error

Load provides a mock function with given fields:

func (*IssuerCredential) NewIssuerKey

func (_m *IssuerCredential) NewIssuerKey() (*idemix.IssuerKey, error)

NewIssuerKey provides a mock function with given fields:

func (*IssuerCredential) SetIssuerKey

func (_m *IssuerCredential) SetIssuerKey(key *idemix.IssuerKey)

SetIssuerKey provides a mock function with given fields: key

func (*IssuerCredential) Store

func (_m *IssuerCredential) Store() error

Store provides a mock function with given fields:

type Lib

Lib is an autogenerated mock type for the Lib type

type Lib struct {
    mock.Mock
}

func (*Lib) CreateCRI

func (_m *Lib) CreateCRI(key *ecdsa.PrivateKey, unrevokedHandles []*FP256BN.BIG, epoch int, alg idemix.RevocationAlgorithm, rng *amcl.RAND) (*idemix.CredentialRevocationInformation, error)

CreateCRI provides a mock function with given fields: key, unrevokedHandles, epoch, alg, rng

func (*Lib) GenerateLongTermRevocationKey

func (_m *Lib) GenerateLongTermRevocationKey() (*ecdsa.PrivateKey, error)

GenerateLongTermRevocationKey provides a mock function with given fields:

func (*Lib) GetRand

func (_m *Lib) GetRand() (*amcl.RAND, error)

GetRand provides a mock function with given fields:

func (*Lib) NewCredential

func (_m *Lib) NewCredential(key *idemix.IssuerKey, m *idemix.CredRequest, attrs []*FP256BN.BIG, rng *amcl.RAND) (*idemix.Credential, error)

NewCredential provides a mock function with given fields: key, m, attrs, rng

func (*Lib) NewIssuerKey

func (_m *Lib) NewIssuerKey(AttributeNames []string, rng *amcl.RAND) (*idemix.IssuerKey, error)

NewIssuerKey provides a mock function with given fields: AttributeNames, rng

func (*Lib) RandModOrder

func (_m *Lib) RandModOrder(rng *amcl.RAND) (*FP256BN.BIG, error)

RandModOrder provides a mock function with given fields: rng

type MyIssuer

MyIssuer is an autogenerated mock type for the MyIssuer type

type MyIssuer struct {
    mock.Mock
}

func (*MyIssuer) Config

func (_m *MyIssuer) Config() *idemix.Config

Config provides a mock function with given fields:

func (*MyIssuer) CredDBAccessor

func (_m *MyIssuer) CredDBAccessor() idemix.CredDBAccessor

CredDBAccessor provides a mock function with given fields:

func (*MyIssuer) DB

func (_m *MyIssuer) DB() db.FabricCADB

DB provides a mock function with given fields:

func (*MyIssuer) HomeDir

func (_m *MyIssuer) HomeDir() string

HomeDir provides a mock function with given fields:

func (*MyIssuer) IdemixLib

func (_m *MyIssuer) IdemixLib() idemix.Lib

IdemixLib provides a mock function with given fields:

func (*MyIssuer) IdemixRand

func (_m *MyIssuer) IdemixRand() *amcl.RAND

IdemixRand provides a mock function with given fields:

func (*MyIssuer) IssuerCredential

func (_m *MyIssuer) IssuerCredential() idemix.IssuerCredential

IssuerCredential provides a mock function with given fields:

func (*MyIssuer) Name

func (_m *MyIssuer) Name() string

Name provides a mock function with given fields:

func (*MyIssuer) NonceManager

func (_m *MyIssuer) NonceManager() idemix.NonceManager

NonceManager provides a mock function with given fields:

func (*MyIssuer) RevocationAuthority

func (_m *MyIssuer) RevocationAuthority() idemix.RevocationAuthority

RevocationAuthority provides a mock function with given fields:

type NonceManager

NonceManager is an autogenerated mock type for the NonceManager type

type NonceManager struct {
    mock.Mock
}

func (*NonceManager) CheckNonce

func (_m *NonceManager) CheckNonce(nonce *FP256BN.BIG) error

CheckNonce provides a mock function with given fields: nonce

func (*NonceManager) GetNonce

func (_m *NonceManager) GetNonce() (*FP256BN.BIG, error)

GetNonce provides a mock function with given fields:

func (*NonceManager) SweepExpiredNonces

func (_m *NonceManager) SweepExpiredNonces() error

SweepExpiredNonces provides a mock function with given fields:

type Result

Result is an autogenerated mock type for the Result type

type Result struct {
    mock.Mock
}

func (*Result) LastInsertId

func (_m *Result) LastInsertId() (int64, error)

LastInsertId provides a mock function with given fields:

func (*Result) RowsAffected

func (_m *Result) RowsAffected() (int64, error)

RowsAffected provides a mock function with given fields:

type RevocationAuthority

RevocationAuthority is an autogenerated mock type for the RevocationAuthority type

type RevocationAuthority struct {
    mock.Mock
}

func (*RevocationAuthority) CreateCRI

func (_m *RevocationAuthority) CreateCRI() (*idemix.CredentialRevocationInformation, error)

CreateCRI provides a mock function with given fields:

func (*RevocationAuthority) Epoch

func (_m *RevocationAuthority) Epoch() (int, error)

Epoch provides a mock function with given fields:

func (*RevocationAuthority) GetNewRevocationHandle

func (_m *RevocationAuthority) GetNewRevocationHandle() (*FP256BN.BIG, error)

GetNewRevocationHandle provides a mock function with given fields:

func (*RevocationAuthority) PublicKey

func (_m *RevocationAuthority) PublicKey() *ecdsa.PublicKey

PublicKey provides a mock function with given fields:

type ServerRequestCtx

ServerRequestCtx is an autogenerated mock type for the ServerRequestCtx type

type ServerRequestCtx struct {
    mock.Mock
}

func (*ServerRequestCtx) BasicAuthentication

func (_m *ServerRequestCtx) BasicAuthentication() (string, error)

BasicAuthentication provides a mock function with given fields:

func (*ServerRequestCtx) GetCaller

func (_m *ServerRequestCtx) GetCaller() (user.User, error)

GetCaller provides a mock function with given fields:

func (*ServerRequestCtx) IsBasicAuth

func (_m *ServerRequestCtx) IsBasicAuth() bool

IsBasicAuth provides a mock function with given fields:

func (*ServerRequestCtx) ReadBody

func (_m *ServerRequestCtx) ReadBody(body interface{}) error

ReadBody provides a mock function with given fields: body

func (*ServerRequestCtx) TokenAuthentication

func (_m *ServerRequestCtx) TokenAuthentication() (string, error)

TokenAuthentication provides a mock function with given fields:

type User

User is an autogenerated mock type for the User type

type User struct {
    mock.Mock
}

func (*User) GetAffiliationPath

func (_m *User) GetAffiliationPath() []string

GetAffiliationPath provides a mock function with given fields:

func (*User) GetAttribute

func (_m *User) GetAttribute(name string) (*api.Attribute, error)

GetAttribute provides a mock function with given fields: name

func (*User) GetAttributes

func (_m *User) GetAttributes(attrNames []string) ([]api.Attribute, error)

GetAttributes provides a mock function with given fields: attrNames

func (*User) GetFailedLoginAttempts

func (_m *User) GetFailedLoginAttempts() int

GetFailedLoginAttempts provides a mock function with given fields:

func (*User) GetLevel

func (_m *User) GetLevel() int

GetLevel provides a mock function with given fields:

func (*User) GetMaxEnrollments

func (_m *User) GetMaxEnrollments() int

GetMaxEnrollments provides a mock function with given fields:

func (*User) GetName

func (_m *User) GetName() string

GetName provides a mock function with given fields:

func (*User) GetType

func (_m *User) GetType() string

GetType provides a mock function with given fields:

func (*User) IncrementIncorrectPasswordAttempts

func (_m *User) IncrementIncorrectPasswordAttempts() error

IncrementIncorrectPasswordAttempts provides a mock function with given fields:

func (*User) IsRevoked

func (_m *User) IsRevoked() bool

IsRevoked provides a mock function with given fields:

func (*User) Login

func (_m *User) Login(password string, caMaxEnrollment int) error

Login provides a mock function with given fields: password, caMaxEnrollment

func (*User) LoginComplete

func (_m *User) LoginComplete() error

LoginComplete provides a mock function with given fields:

func (*User) ModifyAttributes

func (_m *User) ModifyAttributes(attrs []api.Attribute) error

ModifyAttributes provides a mock function with given fields: attrs

func (*User) Revoke

func (_m *User) Revoke() error

Revoke provides a mock function with given fields:

func (*User) SetLevel

func (_m *User) SetLevel(level int) error

SetLevel provides a mock function with given fields: level