api

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 62 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoveryInterceptor added in v1.5.1

func RecoveryInterceptor() connect.UnaryInterceptorFunc

RecoveryInterceptor returns a connect interceptor that recovers from panics in handlers and converts them into CodeInternal errors instead of tearing down the connection. Note: this only catches Go panics — it cannot catch fatal runtime errors such as SIGSEGV from memory corruption, which abort the whole process.

Types

type ConnectServer added in v1.5.1

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

ConnectServer adapts *Server to the connect PrivUtilServiceHandler interface.

func NewConnectServer added in v1.5.1

func NewConnectServer(s *Server) *ConnectServer

NewConnectServer wraps an existing *Server for use with connect-go.

func (*ConnectServer) Base64Decode added in v1.5.1

func (*ConnectServer) Base64Encode added in v1.5.1

func (*ConnectServer) Base64ToFile added in v1.5.1

func (*ConnectServer) BaseConvert added in v1.5.1

func (*ConnectServer) BasicAuthGenerate added in v1.5.1

func (*ConnectServer) CaesarCipher added in v1.5.1

func (*ConnectServer) CalculateHash added in v1.5.1

func (*ConnectServer) CaseConvert added in v1.5.1

func (*ConnectServer) CertParse added in v1.5.1

func (*ConnectServer) ChmodCalc added in v1.5.1

func (*ConnectServer) ColorConvert added in v1.5.1

func (*ConnectServer) Convert added in v1.5.1

func (*ConnectServer) CronExplain added in v1.5.1

func (*ConnectServer) DateAdd added in v1.5.1

func (*ConnectServer) DateDiff added in v1.5.1

func (*ConnectServer) DateFormat added in v1.5.1

func (*ConnectServer) DateInfo added in v1.5.1

func (*ConnectServer) Diff added in v1.5.1

func (*ConnectServer) DockerRunToCompose added in v1.5.1

func (*ConnectServer) ExifRead added in v1.5.1

func (*ConnectServer) FileToBase64 added in v1.5.1

func (*ConnectServer) GenerateLorem added in v1.5.1

func (*ConnectServer) GenerateMac added in v1.5.1

func (*ConnectServer) GeneratePassword added in v1.5.1

func (*ConnectServer) GeneratePort added in v1.5.1

func (*ConnectServer) GenerateRsaKeyPair added in v1.5.1

func (*ConnectServer) GenerateUuid added in v1.5.1

func (*ConnectServer) GitCheatSheet added in v1.5.1

func (*ConnectServer) HiddenChars added in v1.5.1

func (*ConnectServer) HmacGenerate added in v1.5.1

func (*ConnectServer) HtmlDecode added in v1.5.1

func (*ConnectServer) HtmlEncode added in v1.5.1

func (*ConnectServer) HtmlToMarkdown added in v1.5.1

func (*ConnectServer) HttpStatusSearch added in v1.5.1

func (*ConnectServer) IpCalc added in v1.5.1

func (*ConnectServer) Ipv4Convert added in v1.5.1

func (*ConnectServer) Ipv4RangeExpand added in v1.5.1

func (*ConnectServer) JsonFormat added in v1.5.1

func (*ConnectServer) JsonToGo added in v1.5.1

func (*ConnectServer) JwtDecode added in v1.5.1

func (*ConnectServer) LeapYear added in v1.5.1

func (*ConnectServer) ListProcess added in v1.5.1

func (*ConnectServer) MarkdownToHtml added in v1.5.1

func (*ConnectServer) MathEval added in v1.5.1

func (*ConnectServer) MimeLookup added in v1.5.1

func (*ConnectServer) MorseCode added in v1.5.1

func (*ConnectServer) NatoAlphabet added in v1.5.1

func (*ConnectServer) NumeronymGenerate added in v1.5.1

func (*ConnectServer) OtpGenerate added in v1.5.1

func (*ConnectServer) OtpValidate added in v1.5.1

func (*ConnectServer) PercentageCalc added in v1.5.1

func (*ConnectServer) RegexTest added in v1.5.1

func (*ConnectServer) Slugify added in v1.5.1

func (*ConnectServer) SpellCheck added in v1.5.1

func (*ConnectServer) SpellLanguages added in v1.5.1

func (*ConnectServer) SqlFormat added in v1.5.1

func (*ConnectServer) StringEscape added in v1.5.1

func (*ConnectServer) StringObfuscate added in v1.5.1

func (*ConnectServer) SvgOptimize added in v1.5.1

func (*ConnectServer) TempConvert added in v1.5.1

func (*ConnectServer) TextEncode added in v1.5.1

func (*ConnectServer) TextInspect added in v1.5.1

func (*ConnectServer) TextManipulate added in v1.5.1

func (*ConnectServer) TextReplace added in v1.5.1

func (*ConnectServer) TextSimilarity added in v1.5.1

func (*ConnectServer) TimeConvert added in v1.5.1

func (*ConnectServer) TokenCount added in v1.5.1

func (*ConnectServer) UlidGenerate added in v1.5.1

func (*ConnectServer) UnitConvert added in v1.5.1

func (*ConnectServer) UrlDecode added in v1.5.1

func (*ConnectServer) UrlEncode added in v1.5.1

func (*ConnectServer) UrlParse added in v1.5.1

func (*ConnectServer) UserAgentParse added in v1.5.1

func (*ConnectServer) ValidateData added in v1.5.1

type Server

type Server struct{}

Server holds the implementations of all PrivUtil RPC handlers. The handlers are defined as methods across the *_handlers.go files in this package and are exposed via the connect adapter in connect_adapter.go.

func NewServer

func NewServer() *Server

func (*Server) Base64Decode

func (s *Server) Base64Decode(ctx context.Context, req *pb.Base64Request) (*pb.Base64Response, error)

func (*Server) Base64Encode

func (s *Server) Base64Encode(ctx context.Context, req *pb.Base64Request) (*pb.Base64Response, error)

func (*Server) Base64ToFile added in v1.2.0

func (*Server) BaseConvert added in v1.1.4

func (s *Server) BaseConvert(ctx context.Context, req *pb.BaseConvertRequest) (*pb.BaseConvertResponse, error)

func (*Server) BasicAuthGenerate added in v1.2.0

func (s *Server) BasicAuthGenerate(_ context.Context, req *pb.BasicAuthRequest) (*pb.BasicAuthResponse, error)

func (*Server) CaesarCipher added in v1.2.0

func (s *Server) CaesarCipher(_ context.Context, req *pb.CaesarRequest) (*pb.CaesarResponse, error)

func (*Server) CalculateHash

func (s *Server) CalculateHash(ctx context.Context, req *pb.HashRequest) (*pb.HashResponse, error)

func (*Server) CaseConvert

func (s *Server) CaseConvert(ctx context.Context, req *pb.CaseRequest) (*pb.CaseResponse, error)

func (*Server) CertParse

func (s *Server) CertParse(ctx context.Context, req *pb.CertRequest) (*pb.CertResponse, error)

func (*Server) ChmodCalc added in v1.2.0

func (s *Server) ChmodCalc(_ context.Context, req *pb.ChmodRequest) (*pb.ChmodResponse, error)

func (*Server) ColorConvert

func (s *Server) ColorConvert(ctx context.Context, req *pb.ColorRequest) (*pb.ColorResponse, error)

func (*Server) Convert

func (s *Server) Convert(ctx context.Context, req *pb.ConvertRequest) (*pb.ConvertResponse, error)

func (*Server) CronExplain

func (s *Server) CronExplain(ctx context.Context, req *pb.CronRequest) (*pb.CronResponse, error)

func (*Server) DateAdd added in v1.2.0

func (s *Server) DateAdd(_ context.Context, req *pb.DateAddRequest) (*pb.DateAddResponse, error)

func (*Server) DateDiff added in v1.2.0

func (s *Server) DateDiff(_ context.Context, req *pb.DateDiffRequest) (*pb.DateDiffResponse, error)

func (*Server) DateFormat added in v1.2.0

func (s *Server) DateFormat(_ context.Context, req *pb.DateFormatRequest) (*pb.DateFormatResponse, error)

func (*Server) DateInfo added in v1.2.0

func (s *Server) DateInfo(_ context.Context, req *pb.DateInfoRequest) (*pb.DateInfoResponse, error)

func (*Server) Diff

func (s *Server) Diff(ctx context.Context, req *pb.DiffRequest) (*pb.DiffResponse, error)

func (*Server) DockerRunToCompose added in v1.2.0

func (*Server) ExifRead added in v1.2.0

func (s *Server) ExifRead(_ context.Context, req *pb.ExifReadRequest) (*pb.ExifReadResponse, error)

func (*Server) FileToBase64 added in v1.2.0

func (*Server) GenerateLorem

func (s *Server) GenerateLorem(ctx context.Context, req *pb.LoremRequest) (*pb.LoremResponse, error)

func (*Server) GenerateMac added in v1.2.0

func (s *Server) GenerateMac(_ context.Context, req *pb.MacRequest) (*pb.MacResponse, error)

func (*Server) GeneratePassword

func (s *Server) GeneratePassword(ctx context.Context, req *pb.PasswordRequest) (*pb.PasswordResponse, error)

func (*Server) GeneratePort added in v1.2.0

func (s *Server) GeneratePort(_ context.Context, req *pb.PortRequest) (*pb.PortResponse, error)

func (*Server) GenerateRsaKeyPair added in v1.1.4

func (s *Server) GenerateRsaKeyPair(ctx context.Context, req *pb.RsaKeyRequest) (*pb.RsaKeyResponse, error)

func (*Server) GenerateUuid

func (s *Server) GenerateUuid(ctx context.Context, req *pb.UuidRequest) (*pb.UuidResponse, error)

func (*Server) GitCheatSheet added in v1.2.0

func (*Server) HiddenChars added in v1.2.0

func (s *Server) HiddenChars(_ context.Context, req *pb.HiddenCharsRequest) (*pb.HiddenCharsResponse, error)

func (*Server) HmacGenerate added in v1.2.0

func (s *Server) HmacGenerate(_ context.Context, req *pb.HmacRequest) (*pb.HmacResponse, error)

func (*Server) HtmlDecode

func (s *Server) HtmlDecode(ctx context.Context, req *pb.TextRequest) (*pb.TextResponse, error)

func (*Server) HtmlEncode

func (s *Server) HtmlEncode(ctx context.Context, req *pb.TextRequest) (*pb.TextResponse, error)

func (*Server) HtmlToMarkdown added in v1.1.4

func (s *Server) HtmlToMarkdown(ctx context.Context, req *pb.TextRequest) (*pb.TextResponse, error)

func (*Server) HttpStatusSearch added in v1.2.0

func (*Server) IpCalc

func (s *Server) IpCalc(ctx context.Context, req *pb.IpRequest) (*pb.IpResponse, error)

func (*Server) Ipv4Convert added in v1.2.0

func (s *Server) Ipv4Convert(_ context.Context, req *pb.Ipv4ConvertRequest) (*pb.Ipv4ConvertResponse, error)

func (*Server) Ipv4RangeExpand added in v1.2.0

func (s *Server) Ipv4RangeExpand(_ context.Context, req *pb.Ipv4RangeRequest) (*pb.Ipv4RangeResponse, error)

func (*Server) JsonFormat

func (s *Server) JsonFormat(ctx context.Context, req *pb.JsonFormatRequest) (*pb.JsonFormatResponse, error)

func (*Server) JsonToGo

func (s *Server) JsonToGo(ctx context.Context, req *pb.JsonToGoRequest) (*pb.JsonToGoResponse, error)

func (*Server) JwtDecode

func (s *Server) JwtDecode(ctx context.Context, req *pb.JwtRequest) (*pb.JwtResponse, error)

func (*Server) LeapYear added in v1.2.0

func (s *Server) LeapYear(_ context.Context, req *pb.LeapYearRequest) (*pb.LeapYearResponse, error)

func (*Server) ListProcess added in v1.2.0

func (s *Server) ListProcess(_ context.Context, req *pb.ListRequest) (*pb.ListResponse, error)

func (*Server) MarkdownToHtml added in v1.1.4

func (s *Server) MarkdownToHtml(ctx context.Context, req *pb.TextRequest) (*pb.TextResponse, error)

func (*Server) MathEval added in v1.2.0

func (s *Server) MathEval(_ context.Context, req *pb.MathEvalRequest) (*pb.MathEvalResponse, error)

func (*Server) MimeLookup added in v1.2.0

func (s *Server) MimeLookup(_ context.Context, req *pb.MimeLookupRequest) (*pb.MimeLookupResponse, error)

func (*Server) MorseCode added in v1.2.0

func (s *Server) MorseCode(_ context.Context, req *pb.MorseRequest) (*pb.MorseResponse, error)

func (*Server) NatoAlphabet added in v1.2.0

func (s *Server) NatoAlphabet(_ context.Context, req *pb.NatoRequest) (*pb.NatoResponse, error)

func (*Server) NumeronymGenerate added in v1.2.0

func (s *Server) NumeronymGenerate(_ context.Context, req *pb.NumeronymRequest) (*pb.NumeronymResponse, error)

func (*Server) OtpGenerate added in v1.2.0

func (s *Server) OtpGenerate(_ context.Context, req *pb.OtpRequest) (*pb.OtpResponse, error)

func (*Server) OtpValidate added in v1.2.0

func (s *Server) OtpValidate(_ context.Context, req *pb.OtpValidateRequest) (*pb.OtpValidateResponse, error)

func (*Server) PercentageCalc added in v1.2.0

func (s *Server) PercentageCalc(_ context.Context, req *pb.PercentageRequest) (*pb.PercentageResponse, error)

func (*Server) RegexTest

func (s *Server) RegexTest(ctx context.Context, req *pb.RegexRequest) (*pb.RegexResponse, error)

func (*Server) Slugify added in v1.2.0

func (s *Server) Slugify(_ context.Context, req *pb.SlugifyRequest) (*pb.SlugifyResponse, error)

func (*Server) SpellCheck added in v1.5.0

func (s *Server) SpellCheck(ctx context.Context, req *pb.SpellCheckRequest) (*pb.SpellCheckResponse, error)

SpellCheck runs the offline spell- and grammar-checking engine over the supplied text and returns located issues with suggested corrections.

func (*Server) SpellLanguages added in v1.5.0

SpellLanguages reports the languages supported by the offline engine.

func (*Server) SqlFormat

func (s *Server) SqlFormat(ctx context.Context, req *pb.SqlRequest) (*pb.SqlResponse, error)

func (*Server) StringEscape

func (s *Server) StringEscape(ctx context.Context, req *pb.EscapeRequest) (*pb.EscapeResponse, error)

func (*Server) StringObfuscate added in v1.2.0

func (*Server) SvgOptimize added in v1.2.0

func (s *Server) SvgOptimize(_ context.Context, req *pb.SvgOptimizeRequest) (*pb.SvgOptimizeResponse, error)

func (*Server) TempConvert added in v1.2.0

func (s *Server) TempConvert(_ context.Context, req *pb.TempConvertRequest) (*pb.TempConvertResponse, error)

func (*Server) TextEncode added in v1.2.0

func (s *Server) TextEncode(_ context.Context, req *pb.TextEncodeRequest) (*pb.TextEncodeResponse, error)

func (*Server) TextInspect

func (s *Server) TextInspect(ctx context.Context, req *pb.TextInspectRequest) (*pb.TextInspectResponse, error)

func (*Server) TextManipulate

func (s *Server) TextManipulate(ctx context.Context, req *pb.TextManipulateRequest) (*pb.TextManipulateResponse, error)

func (*Server) TextReplace added in v1.2.0

func (s *Server) TextReplace(_ context.Context, req *pb.TextReplaceRequest) (*pb.TextReplaceResponse, error)

func (*Server) TextSimilarity

func (s *Server) TextSimilarity(ctx context.Context, req *pb.SimilarityRequest) (*pb.SimilarityResponse, error)

func (*Server) TimeConvert

func (s *Server) TimeConvert(ctx context.Context, req *pb.TimeRequest) (*pb.TimeResponse, error)

func (*Server) TokenCount added in v1.4.0

func (s *Server) TokenCount(ctx context.Context, req *pb.TokenCountRequest) (*pb.TokenCountResponse, error)

func (*Server) UlidGenerate added in v1.2.0

func (s *Server) UlidGenerate(_ context.Context, req *pb.UlidRequest) (*pb.UlidResponse, error)

func (*Server) UnitConvert added in v1.2.0

func (s *Server) UnitConvert(_ context.Context, req *pb.UnitConvertRequest) (*pb.UnitConvertResponse, error)

func (*Server) UrlDecode

func (s *Server) UrlDecode(ctx context.Context, req *pb.TextRequest) (*pb.TextResponse, error)

func (*Server) UrlEncode

func (s *Server) UrlEncode(ctx context.Context, req *pb.TextRequest) (*pb.TextResponse, error)

func (*Server) UrlParse added in v1.2.0

func (s *Server) UrlParse(_ context.Context, req *pb.UrlParseRequest) (*pb.UrlParseResponse, error)

func (*Server) UserAgentParse added in v1.2.0

func (*Server) ValidateData added in v1.2.0

func (s *Server) ValidateData(ctx context.Context, req *pb.ValidateRequest) (*pb.ValidateResponse, error)

Jump to

Keyboard shortcuts

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