organization

package
v0.0.0-...-02b4537 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(router *gin.Engine, authenticator *authentication.Authenticator, manager *Manager) *Handler

func (*Handler) Register

func (h *Handler) Register()

type Manager

type Manager struct {
}

func NewManager

func NewManager() *Manager

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, organizationID string) (*Organization, error)

func (*Manager) GetByName

func (m *Manager) GetByName(ctx context.Context, name string) (*Organization, error)

func (*Manager) NameExists

func (m *Manager) NameExists(ctx context.Context, name string) (bool, error)

func (*Manager) Save

func (m *Manager) Save(ctx context.Context, name string, creatorID string) (*Organization, error)

type Organization

type Organization struct {
	mgm.DefaultModel `bson:",inline"`
	Name             string `json:"name" bson:"name"`
	CreatorID        string `json:"creator_id" bson:"creator_id"`
	Deleted          bool   `json:"deleted" bson:"deleted"`
}

Jump to

Keyboard shortcuts

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