rest

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRoutes added in v1.2.0

type ActionRoutes interface {
	Validate(request generatedActions.ValidateRequest, projectSlug string) (*generatedActions.ValidateResponse, error)
	Publish(request generatedActions.PublishRequest, projectSlug string) (*generatedActions.PublishResponse, error)
}

type AuthRoutes

type AuthRoutes interface {
	Register(request payloads.RegisterRequest) (*payloads.TokenResponse, error)
	Login(request payloads.LoginRequest) (*payloads.TokenResponse, error)
	Logout(accountId string, tokenId string) error
}

type ContractRoutes

type ContractRoutes interface {
	GetContracts(projectSlug string) (*payloads.GetContractsResponse, error)
	UploadContracts(request payloads.UploadContractsRequest, projectSlug string) (*payloads.UploadContractsResponse, error)
	VerifyContracts(request payloads.UploadContractsRequest) (*payloads.UploadContractsResponse, error)
	RemoveContracts(request payloads.RemoveContractsRequest, projectSlug string) (*payloads.RemoveContractsResponse, error)
}

type ExportRoutes added in v0.6.0

type ExportRoutes interface {
	ExportTransaction(request payloads.ExportTransactionRequest, projectSlug string) (*payloads.ExportTransactionResponse, error)
}

type NetworkRoutes added in v0.8.0

type NetworkRoutes interface {
	GetPublicNetworks() (*payloads.NetworksResponse, error)
}

type ProjectRoutes

type ProjectRoutes interface {
	CreateProject(request payloads.ProjectRequest) (*payloads.ProjectResponse, error)
	GetProject(accountId, id string) (*model.Project, error)
	GetProjects(accountId string) (*payloads.GetProjectsResponse, error)
}

type Rest

type Rest struct {
	Auth     AuthRoutes
	User     UserRoutes
	Project  ProjectRoutes
	Contract ContractRoutes
	Export   ExportRoutes
	Networks NetworkRoutes
	Actions  ActionRoutes
}

func NewRest

func NewRest(
	auth AuthRoutes,
	user UserRoutes,
	project ProjectRoutes,
	contract ContractRoutes,
	export ExportRoutes,
	networks NetworkRoutes,
	actions ActionRoutes,
) *Rest

type UserRoutes

type UserRoutes interface {
	Principal() (*model.Principal, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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