models

package
v0.0.0-...-cccb129 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationInput

type AuthorizationInput struct {
	Token   string             `json:"token"`
	Actions []constants.Action `json:"actions"`
}

type AuthorizationLog

type AuthorizationLog struct {
	UserId      primitive.ObjectID `json:"userId"`
	Role        constants.Role     `json:"role"`
	Actions     []constants.Action `json:"actions"`
	RequestedAt time.Time          `json:"requestedAt"`
	Grant       constants.Grant    `json:"grant"`
	Reason      string             `json:"reason"`
}

type AuthorizationOutput

type AuthorizationOutput struct {
	Grant  constants.Grant    `json:"grant"`
	UserId primitive.ObjectID `json:"userId"`
}

type Bot

type Bot struct {
	ID          primitive.ObjectID `json:"id" bson:"_id"`
	ProjectId   primitive.ObjectID `json:"projectId"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	CreatedAt   time.Time          `json:"createdAt"`
	Owner       primitive.ObjectID `json:"owner"`
}

type DefaultClaims

type DefaultClaims struct {
	JwtCustomClaims
	jwt.StandardClaims
}

DefaultClaims represents the default claims for the JWT token.

type FAQS

type FAQS struct {
	Question string `json:"question"`
	Answer   string `json:"answer"`
}

type Files

type Files struct {
	FileName  string             `json:"fileName"`
	FileId    primitive.ObjectID `json:"fileId"`
	Extension string             `json:"extension"`
}

type JwtCustomClaims

type JwtCustomClaims struct {
	Email     string             `json:"email"`
	UserId    primitive.ObjectID `json:"userId"`
	Role      constants.Role     `json:"role"`
	SessionId primitive.ObjectID `json:"sessionId"`
}

type LoginInput

type LoginInput struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type LoginOutput

type LoginOutput struct {
	Token        string `json:"token"`
	RefreshToken string `json:"refreshToken"`
}

type Project

type Project struct {
	ID          primitive.ObjectID `json:"id" bson:"_id"`
	Name        string             `json:"name"`
	Description string             `json:"Description"`
	CreatedAt   time.Time          `json:"createdAt"`
	Owner       primitive.ObjectID `json:"owner"`
}

type RefreshTokenClaims

type RefreshTokenClaims struct {
	SessionId primitive.ObjectID `json:"sessionId"`
	jwt.StandardClaims
}

RefreshTokenClaims represents the claims for the refresh token.

type Session

type Session struct {
	ID        primitive.ObjectID `json:"id" bson:"_id"`
	UserId    primitive.ObjectID `json:"userId"`
	CreatedAt time.Time          `json:"createdAt"`
	UpdatedAt time.Time          `json:"updatedAt"`
}

type TrainingData

type TrainingData struct {
	ID          primitive.ObjectID `json:"id" bson:"_id"`
	ProjectId   primitive.ObjectID `json:"projectId"`
	BotId       primitive.ObjectID `json:"botId"`
	Files       []Files            `json:"files"`
	Description string             `json:"description"`
	Greeting    string             `json:"greeting"`
	Persona     string             `json:"persona"`
	QA          []FAQS             `json:"qa"`
	Owner       primitive.ObjectID `json:"owner"`
}

type User

type User struct {
	Email     string             `json:"email"`
	FirstName string             `json:"firstname"`
	LastName  string             `json:"lastname"`
	Password  string             `json:"password"`
	ID        primitive.ObjectID `json:"id" bson:"_id"`
	Role      constants.Role     `json:"role"`
}

Jump to

Keyboard shortcuts

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