userorgs

package
v0.0.0-test.8 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedUserOrganization

type AggregatedUserOrganization struct {
	OrgID        string `rql:"name=org_id,type=string"`
	OrgTitle     string `rql:"name=org_title,type=string"`
	OrgName      string `rql:"name=org_name,type=string"`
	OrgAvatar    string
	ProjectCount int64 `rql:"name=project_count,type=int"`
	RoleNames    []string
	RoleTitles   []string
	RoleIDs      []string
	OrgJoinedOn  time.Time `rql:"name=org_joined_on,type=datetime"`
	UserID       string
}

type Group

type Group struct {
	Name string      `json:"name"`
	Data []GroupData `json:"data"`
}

type GroupData

type GroupData struct {
	Name  string `json:"name"`
	Count int    `json:"count"`
}

type Page

type Page struct {
	Limit  int `json:"limit"`
	Offset int `json:"offset"`
}

type Repository

type Repository interface {
	Search(ctx context.Context, userID string, query *rql.Query) (UserOrgs, error)
}

type Service

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

func NewService

func NewService(repository Repository) *Service

func (Service) Search

func (s Service) Search(ctx context.Context, userID string, query *rql.Query) (UserOrgs, error)

type UserOrgs

type UserOrgs struct {
	Organizations []AggregatedUserOrganization `json:"organizations"`
	Group         Group                        `json:"group"`
	Pagination    Page                         `json:"pagination"`
}

Jump to

Keyboard shortcuts

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