user

package
v0.12.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	ConnectedAccounts *ConnectedAccounts `json:"connectedAccounts,omitempty"`
	ID                string             `json:"id,omitempty"`
	OrganizationID    string             `json:"organization.id,omitempty"`
}

type ConnectedAccounts

type ConnectedAccounts struct {
	ElemMatch *ElemMatch `json:"$elemMatch"`
}

type ElemMatch

type ElemMatch struct {
	Type       string `json:"type"`
	Identifier string `json:"identifier"`
}

type ExecutionContext

type ExecutionContext struct {
	Request Request `json:"request"`
	User    User    `json:"user"`
	Member  Member  `json:"member"`
}

type Member

type Member struct {
	ID           string       `json:"id"`
	Name         string       `json:"name"`
	Organization Organization `json:"organization"`
	Rules        []Rule       `json:"rules"`
}

type MockUserService

type MockUserService struct {
	GetExecutionContextrmationFunc func() (ExecutionContext, error)
}

MockUserService is a mock implementation of UserServicer

func NewMockUserService

func NewMockUserService() *MockUserService

NewMockUserService creates a new instance of MockUserService with default behavior

func (*MockUserService) GetExecutionContext

func (m *MockUserService) GetExecutionContext() (ExecutionContext, error)

GetExecutionContextrmation calls the mocked GetExecutionContextrmationFunc

type Organization

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

type Request

type Request struct {
	ID            string `json:"id"`
	CausationID   string `json:"causationId"`
	CorrelationID string `json:"correlationId"`
}

type Rule

type Rule struct {
	Action     string     `json:"action"`
	Subject    string     `json:"subject"`
	Conditions *Condition `json:"conditions,omitempty"`
}

type User

type User struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Rules []Rule `json:"rules"`
	Type  string `json:"type"`
}

type UserService

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

func (*UserService) GetExecutionContext

func (us *UserService) GetExecutionContext() (ExecutionContext, error)

type UserServicer

type UserServicer interface {
	GetExecutionContext() (ExecutionContext, error)
}

func NewService

func NewService() UserServicer

Jump to

Keyboard shortcuts

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