usecase

package
v0.0.0-...-d386c04 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationCreateIn

type ApplicationCreateIn struct {
	WsId string
	Name string
}

func (*ApplicationCreateIn) Validate

func (in *ApplicationCreateIn) Validate() error

type ApplicationCreateOut

type ApplicationCreateOut struct {
	Doc *entities.Application
}

type ApplicationDeleteIn

type ApplicationDeleteIn struct {
	WsId string
	Id   string
}

func (*ApplicationDeleteIn) Validate

func (in *ApplicationDeleteIn) Validate() error

type ApplicationDeleteOut

type ApplicationDeleteOut struct {
	Doc *entities.Application
}

type ApplicationGetIn

type ApplicationGetIn struct {
	WsId string
	Id   string
}

func (*ApplicationGetIn) Validate

func (in *ApplicationGetIn) Validate() error

type ApplicationGetOut

type ApplicationGetOut struct {
	Doc *entities.Application
}

type ApplicationListIn

type ApplicationListIn struct {
	*entities.PagingQuery
	WsId string
}

func (*ApplicationListIn) Validate

func (in *ApplicationListIn) Validate() error

type ApplicationListOut

type ApplicationListOut struct {
	Data  []entities.Application
	Count int64
}

type ApplicationUpdateIn

type ApplicationUpdateIn struct {
	WsId string
	Id   string
	Name string
}

func (*ApplicationUpdateIn) Validate

func (in *ApplicationUpdateIn) Validate() error

type ApplicationUpdateOut

type ApplicationUpdateOut struct {
	Doc *entities.Application
}

type EndpointCreateIn

type EndpointCreateIn struct {
	WsId  string
	AppId string
	Name  string

	SecretKey string
	Uri       string
	Method    string
}

func (*EndpointCreateIn) Validate

func (in *EndpointCreateIn) Validate() error

type EndpointCreateOut

type EndpointCreateOut struct {
	Doc *entities.Endpoint
}

type EndpointDeleteIn

type EndpointDeleteIn struct {
	WsId string
	Id   string
}

func (*EndpointDeleteIn) Validate

func (in *EndpointDeleteIn) Validate() error

type EndpointDeleteOut

type EndpointDeleteOut struct {
	Doc *entities.Endpoint
}

type EndpointGetIn

type EndpointGetIn struct {
	WsId string
	Id   string
}

func (*EndpointGetIn) Validate

func (in *EndpointGetIn) Validate() error

type EndpointGetOut

type EndpointGetOut struct {
	Doc *entities.Endpoint
}

type EndpointListIn

type EndpointListIn struct {
	*entities.PagingQuery
	WsId  string
	AppId string
}

func (*EndpointListIn) Validate

func (in *EndpointListIn) Validate() error

type EndpointListOut

type EndpointListOut struct {
	Data  []entities.Endpoint
	Count int64
}

type EndpointRuleCreateIn

type EndpointRuleCreateIn struct {
	WsId string
	EpId string
	Name string

	Priority            int32
	Exclusionary        bool
	ConditionSource     string
	ConditionExpression string
}

func (*EndpointRuleCreateIn) Validate

func (in *EndpointRuleCreateIn) Validate() error

type EndpointRuleCreateOut

type EndpointRuleCreateOut struct {
	Doc *entities.EndpointRule
}

type EndpointRuleDeleteIn

type EndpointRuleDeleteIn struct {
	WsId string
	Id   string
}

func (*EndpointRuleDeleteIn) Validate

func (in *EndpointRuleDeleteIn) Validate() error

type EndpointRuleDeleteOut

type EndpointRuleDeleteOut struct {
	Doc *entities.EndpointRule
}

type EndpointRuleGetIn

type EndpointRuleGetIn struct {
	WsId string
	Id   string
}

func (*EndpointRuleGetIn) Validate

func (in *EndpointRuleGetIn) Validate() error

type EndpointRuleGetOut

type EndpointRuleGetOut struct {
	Doc *entities.EndpointRule
}

type EndpointRuleListIn

type EndpointRuleListIn struct {
	*entities.PagingQuery
	WsId  string
	AppId string
	EpId  string
}

func (*EndpointRuleListIn) Validate

func (in *EndpointRuleListIn) Validate() error

type EndpointRuleListOut

type EndpointRuleListOut struct {
	Data  []entities.EndpointRule
	Count int64
}

type EndpointRuleUpdateIn

type EndpointRuleUpdateIn struct {
	WsId string
	Id   string
	Name string

	Priority            int32
	Exclusionary        bool
	ConditionSource     string
	ConditionExpression string
}

func (*EndpointRuleUpdateIn) Validate

func (in *EndpointRuleUpdateIn) Validate() error

type EndpointRuleUpdateOut

type EndpointRuleUpdateOut struct {
	Doc *entities.EndpointRule
}

type EndpointUpdateIn

type EndpointUpdateIn struct {
	WsId   string
	Id     string
	Name   string
	Method string
}

func (*EndpointUpdateIn) Validate

func (in *EndpointUpdateIn) Validate() error

type EndpointUpdateOut

type EndpointUpdateOut struct {
	Doc *entities.Endpoint
}

type Message

type Message interface {
	Create(ctx context.Context, in *MessageCreateIn) (*MessageCreateOut, error)
}

type MessageCreateIn

type MessageCreateIn struct {
	WsId  string
	Tier  string
	AppId string
	Type  string

	Body     string
	Headers  entities.Header
	Metadata entities.Metadata
}

func (*MessageCreateIn) Validate

func (in *MessageCreateIn) Validate() error

type MessageCreateOut

type MessageCreateOut struct {
	EventId string `json:"event_id"`
	Message *entities.Message
}

type Sdk

type Sdk interface {
	Workspace() Workspace
	Application() Application
	Endpoint() Endpoint
	EndpointRule() EndpointRule
	Message() Message
}

func New

func New(
	conf *config.Config,
	logger logging.Logger,
	infra *infrastructure.Infrastructure,
	repositories repositories.Repositories,
) Sdk

type Workspace

type Workspace interface {
	Authenticate(ctx context.Context, req *WorkspaceAuthenticateIn) (*WorkspaceAuthenticateOut, error)
	Get(ctx context.Context, in *WorkspaceGetIn) (*WorkspaceGetOut, error)
}

type WorkspaceAuthenticateIn

type WorkspaceAuthenticateIn struct {
	User string
	Pass string
}

func (*WorkspaceAuthenticateIn) Validate

func (in *WorkspaceAuthenticateIn) Validate() error

type WorkspaceAuthenticateOut

type WorkspaceAuthenticateOut struct {
	Credentials *entities.WorkspaceCredentials
}

type WorkspaceGetIn

type WorkspaceGetIn struct {
	AccId string
	Id    string
}

func (*WorkspaceGetIn) Validate

func (in *WorkspaceGetIn) Validate() error

type WorkspaceGetOut

type WorkspaceGetOut struct {
	Doc *entities.Workspace
}

Jump to

Keyboard shortcuts

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