-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
1,627 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Protocol Buffers - Google's data interchange format | ||
// Copyright 2008 Google Inc. All rights reserved. | ||
// Copyright 2022 Teppei Fukuda. All rights reserved. | ||
// https://developers.google.com/protocol-buffers/ | ||
|
||
package wrapperspb | ||
|
||
// Double stores v in a new DoubleValue and returns a pointer to it. | ||
func Double(v float64) *DoubleValue { | ||
return &DoubleValue{Value: v} | ||
} | ||
|
||
// Float stores v in a new FloatValue and returns a pointer to it. | ||
func Float(v float32) *FloatValue { | ||
return &FloatValue{Value: v} | ||
} | ||
|
||
// Int64 stores v in a new Int64Value and returns a pointer to it. | ||
func Int64(v int64) *Int64Value { | ||
return &Int64Value{Value: v} | ||
} | ||
|
||
// UInt64 stores v in a new UInt64Value and returns a pointer to it. | ||
func UInt64(v uint64) *UInt64Value { | ||
return &UInt64Value{Value: v} | ||
} | ||
|
||
// Int32 stores v in a new Int32Value and returns a pointer to it. | ||
func Int32(v int32) *Int32Value { | ||
return &Int32Value{Value: v} | ||
} | ||
|
||
// UInt32 stores v in a new UInt32Value and returns a pointer to it. | ||
func UInt32(v uint32) *UInt32Value { | ||
return &UInt32Value{Value: v} | ||
} | ||
|
||
// Bool stores v in a new BoolValue and returns a pointer to it. | ||
func Bool(v bool) *BoolValue { | ||
return &BoolValue{Value: v} | ||
} | ||
|
||
// String stores v in a new StringValue and returns a pointer to it. | ||
func String(v string) *StringValue { | ||
return &StringValue{Value: v} | ||
} | ||
|
||
// Bytes stores v in a new BytesValue and returns a pointer to it. | ||
func Bytes(v []byte) *BytesValue { | ||
return &BytesValue{Value: v} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Protocol Buffers - Google's data interchange format | ||
// Copyright 2008 Google Inc. All rights reserved. | ||
// Copyright 2008 Teppei Fukuda. All rights reserved. | ||
// https://developers.google.com/protocol-buffers/ | ||
|
||
syntax = "proto3"; | ||
|
||
package google.protobuf; | ||
|
||
option go_package = "github.com/knqyf263/go-plugin/types/known/wrapperspb"; | ||
|
||
// Wrapper message for `double`. | ||
// | ||
// The JSON representation for `DoubleValue` is JSON number. | ||
message DoubleValue { | ||
// The double value. | ||
double value = 1; | ||
} | ||
|
||
// Wrapper message for `float`. | ||
// | ||
// The JSON representation for `FloatValue` is JSON number. | ||
message FloatValue { | ||
// The float value. | ||
float value = 1; | ||
} | ||
|
||
// Wrapper message for `int64`. | ||
// | ||
// The JSON representation for `Int64Value` is JSON string. | ||
message Int64Value { | ||
// The int64 value. | ||
int64 value = 1; | ||
} | ||
|
||
// Wrapper message for `uint64`. | ||
// | ||
// The JSON representation for `UInt64Value` is JSON string. | ||
message UInt64Value { | ||
// The uint64 value. | ||
uint64 value = 1; | ||
} | ||
|
||
// Wrapper message for `int32`. | ||
// | ||
// The JSON representation for `Int32Value` is JSON number. | ||
message Int32Value { | ||
// The int32 value. | ||
int32 value = 1; | ||
} | ||
|
||
// Wrapper message for `uint32`. | ||
// | ||
// The JSON representation for `UInt32Value` is JSON number. | ||
message UInt32Value { | ||
// The uint32 value. | ||
uint32 value = 1; | ||
} | ||
|
||
// Wrapper message for `bool`. | ||
// | ||
// The JSON representation for `BoolValue` is JSON `true` and `false`. | ||
message BoolValue { | ||
// The bool value. | ||
bool value = 1; | ||
} | ||
|
||
// Wrapper message for `string`. | ||
// | ||
// The JSON representation for `StringValue` is JSON string. | ||
message StringValue { | ||
// The string value. | ||
string value = 1; | ||
} | ||
|
||
// Wrapper message for `bytes`. | ||
// | ||
// The JSON representation for `BytesValue` is JSON string. | ||
message BytesValue { | ||
// The bytes value. | ||
bytes value = 1; | ||
} |
Oops, something went wrong.