Help us shape the future of Go! Take the 2026 Go Developer Survey

write

package
v0.1.55 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PathURI = "/v1/api/agently/user/session"

Functions

func DefineComponent

func DefineComponent(ctx context.Context, srv *datly.Service) (*repository.Component, error)

Types

type Handler

type Handler struct{}

func (*Handler) Exec

func (h *Handler) Exec(ctx context.Context, sess handler.Session) (interface{}, error)

type Input

type Input struct {
	Session    *Session `parameter:",kind=body,in=data"`
	CurSession *Session `parameter:",kind=view,in=CurSession" view:"CurSession" sql:"uri=sql/cur_session.sql"`
}

func (*Input) EmbedFS

func (i *Input) EmbedFS() (fs *embed.FS)

func (*Input) Init

func (i *Input) Init(ctx context.Context, sess handler.Session, out *Output) error

type Output

type Output struct {
	response.Status `parameter:",kind=output,in=status" anonymous:"true"`
	Data            *Session               `parameter:",kind=body"`
	Violations      []*validator.Violation `parameter:",kind=transient"`
}

type Session

type Session struct {
	Id        string     `sqlx:"id,primaryKey" json:"id,omitempty"`
	UserID    string     `sqlx:"user_id" json:"userId,omitempty"`
	Provider  string     `sqlx:"provider" json:"provider,omitempty"`
	CreatedAt time.Time  `sqlx:"created_at" json:"createdAt,omitempty" format:"2006-01-02 15:04:05"`
	UpdatedAt *time.Time `sqlx:"updated_at" json:"updatedAt,omitempty" format:"2006-01-02 15:04:05"`
	ExpiresAt time.Time  `sqlx:"expires_at" json:"expiresAt,omitempty" format:"2006-01-02 15:04:05"`

	Has *SessionHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}

func (*Session) SetCreatedAt

func (s *Session) SetCreatedAt(v time.Time)

func (*Session) SetExpiresAt

func (s *Session) SetExpiresAt(v time.Time)

func (*Session) SetID

func (s *Session) SetID(v string)

func (*Session) SetProvider

func (s *Session) SetProvider(v string)

func (*Session) SetUpdatedAt

func (s *Session) SetUpdatedAt(v time.Time)

func (*Session) SetUserID

func (s *Session) SetUserID(v string)

type SessionHas

type SessionHas struct {
	Id        bool
	UserID    bool
	Provider  bool
	CreatedAt bool
	UpdatedAt bool
	ExpiresAt bool
}

Jump to

Keyboard shortcuts

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