validation

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(New, wire.Bind(new(any), new(*Validator)))

ProviderSet is a Wire provider set that declares dependency injection rules.

Functions

This section is empty.

Types

type Validator

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

Validator is a struct that implements custom validation logic.

func New

func New(store store.IStore) *Validator

New creates a new instance of Validator.

func (*Validator) ValidateAuthRequest

func (v *Validator) ValidateAuthRequest(ctx context.Context, rq *v1.AuthRequest) error

ValidateAuthRequest validates the authentication rquest. In this sample, no actual validation is needed, so it returns nil directly.

func (*Validator) ValidateAuthorizeRequest

func (v *Validator) ValidateAuthorizeRequest(ctx context.Context, rq *v1.AuthorizeRequest) error

ValidateAuthorizeRequest validates the authorization rquest. In this sample, no actual validation is needed, so it returns nil directly.

func (*Validator) ValidateCreateSecretRequest

func (v *Validator) ValidateCreateSecretRequest(ctx context.Context, rq *v1.CreateSecretRequest) error

ValidateCreateSecretRequest validates the fields of a CreateSecretRequest.

func (*Validator) ValidateCreateUserRequest

func (v *Validator) ValidateCreateUserRequest(ctx context.Context, rq *v1.CreateUserRequest) error

ValidateCreateUserRequest validates the fields of a CreateUserRequest.

func (*Validator) ValidateDeleteSecretRequest

func (v *Validator) ValidateDeleteSecretRequest(ctx context.Context, rq *v1.DeleteSecretRequest) error

ValidateDeleteSecretRequest validates the fields of a DeleteSecretRequest.

func (*Validator) ValidateDeleteUserRequest

func (v *Validator) ValidateDeleteUserRequest(ctx context.Context, rq *v1.DeleteUserRequest) error

ValidateDeleteUserRequest validates the fields of a DeleteUserRequest.

func (*Validator) ValidateGetSecretRequest

func (v *Validator) ValidateGetSecretRequest(ctx context.Context, rq *v1.GetSecretRequest) error

ValidateGetSecretRequest validates the fields of a GetSecretRequest.

func (*Validator) ValidateGetUserRequest

func (v *Validator) ValidateGetUserRequest(ctx context.Context, rq *v1.GetUserRequest) error

ValidateGetUserRequest validates the fields of a GetUserRequest.

func (*Validator) ValidateListSecretRequest

func (v *Validator) ValidateListSecretRequest(ctx context.Context, rq *v1.ListSecretRequest) error

ValidateListSecretRequest validates the fields of a ListSecretRequest, focusing on selected fields ("Offset" and "Limit").

func (*Validator) ValidateListUserRequest

func (v *Validator) ValidateListUserRequest(ctx context.Context, rq *v1.ListUserRequest) error

ValidateListUserRequest validates the fields of a ListUserRequest, focusing on selected fields ("Offset" and "Limit").

func (*Validator) ValidateSecretRules

func (v *Validator) ValidateSecretRules() genericvalidation.Rules

ValidateSecretRules returns a set of validation rules for secret-related requests.

func (*Validator) ValidateUpdateSecretRequest

func (v *Validator) ValidateUpdateSecretRequest(ctx context.Context, rq *v1.UpdateSecretRequest) error

ValidateUpdateSecretRequest validates the fields of an UpdateSecretRequest.

func (*Validator) ValidateUpdateUserRequest

func (v *Validator) ValidateUpdateUserRequest(ctx context.Context, rq *v1.UpdateUserRequest) error

ValidateUpdateUserRequest validates the fields of an UpdateUserRequest.

func (*Validator) ValidateUserRules

func (v *Validator) ValidateUserRules() genericvalidation.Rules

ValidateUserRules returns a set of validation rules for user-related requests.

Jump to

Keyboard shortcuts

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