Documentation
¶
Index ¶
- type Service
- func (s *Service) FindByUsername(ctx context.Context, username string) (*userread.UserView, error)
- func (s *Service) UpdateAgentSettingsByUsername(ctx context.Context, username string, ...) error
- func (s *Service) UpdateHashIPByID(ctx context.Context, id, hash string) error
- func (s *Service) UpdatePreferencesByUsername(ctx context.Context, username string, ...) error
- func (s *Service) UpsertLocal(ctx context.Context, username, displayName, email string) (string, error)
- func (s *Service) UpsertWithProvider(ctx context.Context, username, displayName, email, provider, subject string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides minimal CRUD helpers on top of datly for users.
func (*Service) FindByUsername ¶
FindByUsername returns a single user view or nil.
func (*Service) UpdateAgentSettingsByUsername ¶
func (s *Service) UpdateAgentSettingsByUsername(ctx context.Context, username string, agentPrefs map[string]map[string]interface{}) error
UpdateAgentSettingsByUsername merges per-agent settings into users.settings JSON for the given username. The payload shape is expected as: { agentId: { tools: [], toolCallExposure: "turn|conversation", autoSummarize: bool, chainsEnabled: bool }, ... }
func (*Service) UpdateHashIPByID ¶
UpdateHashIPByID sets users.hash_ip in a server-controlled way.
func (*Service) UpdatePreferencesByUsername ¶
func (s *Service) UpdatePreferencesByUsername(ctx context.Context, username string, displayName, timezone, defaultAgentRef, defaultModelRef, defaultEmbedderRef *string) error
UpdatePreferencesByUsername updates default agent/model and basic fields for a user identified by username.
Click to show internal directories.
Click to hide internal directories.