package application

import (
	"context"

	appent "github.com/tidbcloud/devops/entity/application"
)

type ListApplicationsParam struct {
}

type CreateApplicationParam struct {
	Name        string
	Description string
	Owners      []string
}

type UpdateApplicationParam struct {
	Description *string
	Owners      *[]string
}

type ApplicationService interface {
	ListApplications(ctx context.Context, param ListApplicationsParam) ([]*appent.Application, int64, error)
	GetApplication(ctx context.Context, name string) (*appent.Application, error)
	CreateApplication(ctx context.Context, param CreateApplicationParam) (*appent.Application, error)
	UpdateApplication(ctx context.Context, name string, param UpdateApplicationParam) (*appent.Application, error)
	DeleteApplication(ctx context.Context, name string) error
}
