app

package
v0.12.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAppId

func CheckAppId(appId string) error

Types

type App

type App struct {
	ID           string       `json:"id"`
	AlternateId  string       `json:"alternateId"`
	Name         string       `json:"name"`
	Organization Organization `json:"organization"`
	Project      *Project     `json:"project,omitempty"`
}

type AppService

type AppService struct {
	// contains filtered or unexported fields
}

func NewService

func NewService() *AppService

func (*AppService) CreateApp

func (ps *AppService) CreateApp(organizationID, projectId, alternateID, name string) (App, error)

func (*AppService) DeleteApp

func (ps *AppService) DeleteApp(organizationID, appID string) error

func (*AppService) GetApp

func (ps *AppService) GetApp(organizationID, appID string) (App, error)

func (*AppService) GetListApps

func (ps *AppService) GetListApps(organizationID, projectID string, pageSize, pageNum int) ([]App, error)

type AppServicer

type AppServicer interface {
	GetListApps(organizationID, projectID string, pageSize, pageNum int) ([]App, error)
	CreateApp(organizationID, projectID, alternateID, name string) (App, error)
	GetApp(organizationID, appID string) (App, error)
	DeleteApp(organizationID, appID string) error
}

type MockAppService

type MockAppService struct {
	mock.Mock
}

MockAppService is a mock implementation of the AppServicer interface

func (*MockAppService) CreateApp

func (m *MockAppService) CreateApp(organizationID, alternateID, name string) (App, error)

CreateApp mocks the CreateApp method

func (*MockAppService) DeleteApp

func (m *MockAppService) DeleteApp(organizationID, appID string) error

DeleteApp mocks the DeleteApp method

func (*MockAppService) GetApp

func (m *MockAppService) GetApp(organizationID, appID string) (App, error)

GetApp mocks the GetApp method

func (*MockAppService) GetListApps

func (m *MockAppService) GetListApps(organizationID string, pageSize, pageNum int) ([]App, error)

GetListApps mocks the GetListApps method

type Organization

type Organization struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Project

type Project struct {
	ID          string `json:"id"`
	AlternateId string `json:"alternateId"`
	Name        string `json:"name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL