Skip to content

Commit

Permalink
fix go generate command in interface files
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Wu <[email protected]>
  • Loading branch information
popojk committed Jan 28, 2025
1 parent 3f86dca commit 0e69dd2
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 58 deletions.
2 changes: 2 additions & 0 deletions flyteadmin/pkg/manager/interfaces/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery-v2 --name=ExecutionInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Workflow Executions
type ExecutionInterface interface {
CreateExecution(ctx context.Context, request *admin.ExecutionCreateRequest, requestedAt time.Time) (
Expand Down
2 changes: 2 additions & 0 deletions flyteadmin/pkg/manager/interfaces/launch_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery-v2 --name=LaunchPlanInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Launch Plans
type LaunchPlanInterface interface {
// Interface to create Launch Plans based on the request.
Expand Down
2 changes: 2 additions & 0 deletions flyteadmin/pkg/manager/interfaces/named_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery-v2 --name=NamedEntityInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing metadata associated with NamedEntityIdentifiers
type NamedEntityInterface interface {
GetNamedEntity(ctx context.Context, request *admin.NamedEntityGetRequest) (*admin.NamedEntity, error)
Expand Down
2 changes: 2 additions & 0 deletions flyteadmin/pkg/manager/interfaces/node_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery-v2 --name=NodeExecutionInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Workflow NodeExecutions
type NodeExecutionInterface interface {
CreateNodeEvent(ctx context.Context, request *admin.NodeExecutionEventRequest) (
Expand Down
2 changes: 2 additions & 0 deletions flyteadmin/pkg/manager/interfaces/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery-v2 --name=ProjectInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing projects (and domains).
type ProjectInterface interface {
CreateProject(ctx context.Context, request *admin.ProjectRegisterRequest) (*admin.ProjectRegisterResponse, error)
Expand Down
2 changes: 1 addition & 1 deletion flyteadmin/pkg/manager/interfaces/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery -name ResourceInterface -output=../mocks -case=underscore
//go:generate mockery-v2 --name=ResourceInterface --output=../mocks --case=underscore --with-expecter

// ResourceInterface manages project, domain and workflow -specific attributes.
type ResourceInterface interface {
Expand Down
2 changes: 2 additions & 0 deletions flyteadmin/pkg/manager/interfaces/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery-v2 --name=TaskInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Tasks
type TaskInterface interface {
CreateTask(ctx context.Context, request *admin.TaskCreateRequest) (*admin.TaskCreateResponse, error)
Expand Down
2 changes: 2 additions & 0 deletions flyteadmin/pkg/manager/interfaces/task_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery-v2 --name=TaskExecutionInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Workflow TaskExecutions
type TaskExecutionInterface interface {
CreateTaskExecutionEvent(ctx context.Context, request *admin.TaskExecutionEventRequest) (
Expand Down
2 changes: 1 addition & 1 deletion flyteadmin/pkg/manager/interfaces/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery -name VersionInterface -output=../mocks -case=underscore
//go:generate mockery-v2 --name=VersionInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte admin version
type VersionInterface interface {
Expand Down
2 changes: 2 additions & 0 deletions flyteadmin/pkg/manager/interfaces/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin"
)

//go:generate mockery-v2 --name=WorkflowInterface --output=../mocks --case=underscore --with-expecter

// Interface for managing Flyte Workflows
type WorkflowInterface interface {
CreateWorkflow(ctx context.Context, request *admin.WorkflowCreateRequest) (*admin.WorkflowCreateResponse, error)
Expand Down
72 changes: 16 additions & 56 deletions flyteadmin/pkg/manager/mocks/metrics_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e69dd2

Please sign in to comment.