backend

package
v0.0.0-...-0a0123b Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(length int, secret, identifier string) (string, error)

Types

type Backend

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

func NewBackend

func NewBackend(
	s *db.Service,
	manager *http.Store,
	h *chals.Handler,
	openai *openai.Agent,
	b *bucket.Builder,
	c chals.Config,
) *Backend

func (*Backend) ChallengeType

func (b *Backend) ChallengeType(ctx context.Context, c *connect.Request[xctf.Empty]) (*connect.Response[xctf.ChallengeTypeResponse], error)

func (*Backend) CurrentUser

func (b *Backend) CurrentUser(ctx context.Context, request *connect.Request[xctf.CurrentUserRequest]) (*connect.Response[xctf.CurrentUserResponse], error)

func (*Backend) DeleteCompetition

func (b *Backend) DeleteCompetition(ctx context.Context, c *connect.Request[chalgen.Competition]) (*connect.Response[xctf.Empty], error)

func (*Backend) ForgotPassword

func (b *Backend) ForgotPassword(ctx context.Context, request *connect.Request[xctf.ForgotPasswordRequest]) (*connect.Response[xctf.Empty], error)

func (*Backend) GetCompetitions

func (b *Backend) GetCompetitions(ctx context.Context, c *connect.Request[xctf.Empty]) (*connect.Response[chalgen.CompetitionList], error)

func (*Backend) GetComputer

func (b *Backend) GetComputer(ctx context.Context, c *connect.Request[xctf.GetComputerRequest]) (*connect.Response[xctf.GetComputerResponse], error)

func (*Backend) GetDiscoveredEvidence

func (b *Backend) GetDiscoveredEvidence(ctx context.Context, request *connect.Request[xctf.GetDiscoveredEvidenceRequest]) (*connect.Response[xctf.GetDiscoveredEvidenceResponse], error)

func (*Backend) GetHomePage

func (b *Backend) GetHomePage(
	ctx context.Context,
	request *connect.Request[xctf.GetHomePageRequest],
) (*connect.Response[xctf.GetHomePageResponse], error)

func (*Backend) GetUserWriteup

func (b *Backend) GetUserWriteup(ctx context.Context, c *connect.Request[xctf.Empty]) (*connect.Response[xctf.GetUserWriteupResponse], error)

func (*Backend) Login

func (b *Backend) Login(ctx context.Context, request *connect.Request[xctf.LoginRequest]) (*connect.Response[xctf.LoginResponse], error)

func (*Backend) Logout

func (b *Backend) Logout(ctx context.Context, request *connect.Request[xctf.Empty]) (*connect.Response[xctf.Empty], error)

func (*Backend) Register

func (b *Backend) Register(ctx context.Context, request *connect.Request[xctf.RegisterRequest]) (*connect.Response[xctf.RegisterResponse], error)

func (*Backend) SignedURL

func (b *Backend) SignedURL(ctx context.Context, c *connect.Request[xctf.SignedURLRequest]) (*connect.Response[xctf.SignedURLResponse], error)

func (*Backend) SubmitEvidence

func (b *Backend) SubmitEvidence(ctx context.Context, request *connect.Request[xctf.SubmitEvidenceRequest]) (*connect.Response[xctf.SubmitEvidenceResponse], error)

func (*Backend) SubmitEvidenceConnection

func (b *Backend) SubmitEvidenceConnection(
	ctx context.Context,
	request *connect.Request[xctf.SubmitEvidenceConnectionRequest],
) (*connect.Response[xctf.SubmitEvidenceConnectionResponse], error)

func (*Backend) SubmitEvidenceReport

func (b *Backend) SubmitEvidenceReport(ctx context.Context, req *connect.Request[xctf.SubmitEvidenceReportRequest]) (*connect.Response[xctf.SubmitEvidenceReportRequest], error)

func (*Backend) SubmitFlag

func (b *Backend) SubmitFlag(ctx context.Context, request *connect.Request[xctf.SubmitFlagRequest]) (*connect.Response[xctf.SubmitFlagResponse], error)

func (*Backend) SubmitWriteup

func (b *Backend) SubmitWriteup(ctx context.Context, request *connect.Request[xctf.SubmitWriteupRequest]) (*connect.Response[xctf.Empty], error)

func (*Backend) UpdateCompetition

func (b *Backend) UpdateCompetition(ctx context.Context, c *connect.Request[chalgen.Competition]) (*connect.Response[chalgen.Competition], error)

Jump to

Keyboard shortcuts

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