2024-03-27 11:17:04 +08:00
// Code generated by mockery v2.42.1. DO NOT EDIT.
2023-05-06 17:00:52 +08:00
package mocks
import (
context "context"
2024-03-27 11:17:04 +08:00
connect "connectrpc.com/connect"
2023-05-06 17:00:52 +08:00
mock "github.com/stretchr/testify/mock"
pingv1 "code.gitea.io/actions-proto-go/ping/v1"
runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
)
// Client is an autogenerated mock type for the Client type
type Client struct {
mock . Mock
}
// Address provides a mock function with given fields:
func ( _m * Client ) Address ( ) string {
ret := _m . Called ( )
2024-03-27 11:17:04 +08:00
if len ( ret ) == 0 {
panic ( "no return value specified for Address" )
}
2023-05-06 17:00:52 +08:00
var r0 string
if rf , ok := ret . Get ( 0 ) . ( func ( ) string ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( string )
}
return r0
}
2023-06-15 11:59:15 +08:00
// Declare provides a mock function with given fields: _a0, _a1
func ( _m * Client ) Declare ( _a0 context . Context , _a1 * connect . Request [ runnerv1 . DeclareRequest ] ) ( * connect . Response [ runnerv1 . DeclareResponse ] , error ) {
ret := _m . Called ( _a0 , _a1 )
2024-03-27 11:17:04 +08:00
if len ( ret ) == 0 {
panic ( "no return value specified for Declare" )
}
2023-06-15 11:59:15 +08:00
var r0 * connect . Response [ runnerv1 . DeclareResponse ]
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . DeclareRequest ] ) ( * connect . Response [ runnerv1 . DeclareResponse ] , error ) ) ; ok {
return rf ( _a0 , _a1 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . DeclareRequest ] ) * connect . Response [ runnerv1 . DeclareResponse ] ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * connect . Response [ runnerv1 . DeclareResponse ] )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * connect . Request [ runnerv1 . DeclareRequest ] ) error ) ; ok {
r1 = rf ( _a0 , _a1 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-05-06 17:00:52 +08:00
// FetchTask provides a mock function with given fields: _a0, _a1
func ( _m * Client ) FetchTask ( _a0 context . Context , _a1 * connect . Request [ runnerv1 . FetchTaskRequest ] ) ( * connect . Response [ runnerv1 . FetchTaskResponse ] , error ) {
ret := _m . Called ( _a0 , _a1 )
2024-03-27 11:17:04 +08:00
if len ( ret ) == 0 {
panic ( "no return value specified for FetchTask" )
}
2023-05-06 17:00:52 +08:00
var r0 * connect . Response [ runnerv1 . FetchTaskResponse ]
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . FetchTaskRequest ] ) ( * connect . Response [ runnerv1 . FetchTaskResponse ] , error ) ) ; ok {
return rf ( _a0 , _a1 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . FetchTaskRequest ] ) * connect . Response [ runnerv1 . FetchTaskResponse ] ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * connect . Response [ runnerv1 . FetchTaskResponse ] )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * connect . Request [ runnerv1 . FetchTaskRequest ] ) error ) ; ok {
r1 = rf ( _a0 , _a1 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// Insecure provides a mock function with given fields:
func ( _m * Client ) Insecure ( ) bool {
ret := _m . Called ( )
2024-03-27 11:17:04 +08:00
if len ( ret ) == 0 {
panic ( "no return value specified for Insecure" )
}
2023-05-06 17:00:52 +08:00
var r0 bool
if rf , ok := ret . Get ( 0 ) . ( func ( ) bool ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( bool )
}
return r0
}
// Ping provides a mock function with given fields: _a0, _a1
func ( _m * Client ) Ping ( _a0 context . Context , _a1 * connect . Request [ pingv1 . PingRequest ] ) ( * connect . Response [ pingv1 . PingResponse ] , error ) {
ret := _m . Called ( _a0 , _a1 )
2024-03-27 11:17:04 +08:00
if len ( ret ) == 0 {
panic ( "no return value specified for Ping" )
}
2023-05-06 17:00:52 +08:00
var r0 * connect . Response [ pingv1 . PingResponse ]
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ pingv1 . PingRequest ] ) ( * connect . Response [ pingv1 . PingResponse ] , error ) ) ; ok {
return rf ( _a0 , _a1 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ pingv1 . PingRequest ] ) * connect . Response [ pingv1 . PingResponse ] ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * connect . Response [ pingv1 . PingResponse ] )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * connect . Request [ pingv1 . PingRequest ] ) error ) ; ok {
r1 = rf ( _a0 , _a1 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// Register provides a mock function with given fields: _a0, _a1
func ( _m * Client ) Register ( _a0 context . Context , _a1 * connect . Request [ runnerv1 . RegisterRequest ] ) ( * connect . Response [ runnerv1 . RegisterResponse ] , error ) {
ret := _m . Called ( _a0 , _a1 )
2024-03-27 11:17:04 +08:00
if len ( ret ) == 0 {
panic ( "no return value specified for Register" )
}
2023-05-06 17:00:52 +08:00
var r0 * connect . Response [ runnerv1 . RegisterResponse ]
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . RegisterRequest ] ) ( * connect . Response [ runnerv1 . RegisterResponse ] , error ) ) ; ok {
return rf ( _a0 , _a1 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . RegisterRequest ] ) * connect . Response [ runnerv1 . RegisterResponse ] ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * connect . Response [ runnerv1 . RegisterResponse ] )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * connect . Request [ runnerv1 . RegisterRequest ] ) error ) ; ok {
r1 = rf ( _a0 , _a1 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// UpdateLog provides a mock function with given fields: _a0, _a1
func ( _m * Client ) UpdateLog ( _a0 context . Context , _a1 * connect . Request [ runnerv1 . UpdateLogRequest ] ) ( * connect . Response [ runnerv1 . UpdateLogResponse ] , error ) {
ret := _m . Called ( _a0 , _a1 )
2024-03-27 11:17:04 +08:00
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateLog" )
}
2023-05-06 17:00:52 +08:00
var r0 * connect . Response [ runnerv1 . UpdateLogResponse ]
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . UpdateLogRequest ] ) ( * connect . Response [ runnerv1 . UpdateLogResponse ] , error ) ) ; ok {
return rf ( _a0 , _a1 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . UpdateLogRequest ] ) * connect . Response [ runnerv1 . UpdateLogResponse ] ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * connect . Response [ runnerv1 . UpdateLogResponse ] )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * connect . Request [ runnerv1 . UpdateLogRequest ] ) error ) ; ok {
r1 = rf ( _a0 , _a1 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// UpdateTask provides a mock function with given fields: _a0, _a1
func ( _m * Client ) UpdateTask ( _a0 context . Context , _a1 * connect . Request [ runnerv1 . UpdateTaskRequest ] ) ( * connect . Response [ runnerv1 . UpdateTaskResponse ] , error ) {
ret := _m . Called ( _a0 , _a1 )
2024-03-27 11:17:04 +08:00
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateTask" )
}
2023-05-06 17:00:52 +08:00
var r0 * connect . Response [ runnerv1 . UpdateTaskResponse ]
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . UpdateTaskRequest ] ) ( * connect . Response [ runnerv1 . UpdateTaskResponse ] , error ) ) ; ok {
return rf ( _a0 , _a1 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * connect . Request [ runnerv1 . UpdateTaskRequest ] ) * connect . Response [ runnerv1 . UpdateTaskResponse ] ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * connect . Response [ runnerv1 . UpdateTaskResponse ] )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , * connect . Request [ runnerv1 . UpdateTaskRequest ] ) error ) ; ok {
r1 = rf ( _a0 , _a1 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-03-27 11:17:04 +08:00
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewClient ( t interface {
2023-05-06 17:00:52 +08:00
mock . TestingT
Cleanup ( func ( ) )
2024-03-27 11:17:04 +08:00
} ,
) * Client {
2023-05-06 17:00:52 +08:00
mock := & Client { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}