_id stringlengths 2 7 | title stringlengths 1 118 | partition stringclasses 3
values | text stringlengths 52 85.5k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q172800 | SetMaxFileCount | validation | func (f *FileLogger) SetMaxFileCount(count int) int {
f.fileCount = count
return f.fileCount
} | go | {
"resource": ""
} |
q172801 | SetMaxFileSize | validation | func (f *FileLogger) SetMaxFileSize(size int64, unit UNIT) int64 {
f.fileSize = size * int64(unit)
return f.fileSize
} | go | {
"resource": ""
} |
q172802 | fileSize | validation | func fileSize(file string) int64 {
f, e := os.Stat(file)
if e != nil {
return 0
}
return f.Size()
} | go | {
"resource": ""
} |
q172803 | GetProfile | validation | func (m *Messenger) GetProfile(userID string) (*Profile, error) {
resp, err := m.doRequest("GET", fmt.Sprintf(GraphAPI+"/v2.6/%s?fields=first_name,last_name,profile_pic,locale,timezone,gender", userID), nil)
if err != nil {
return nil, err
}
defer resp.Body.Close()
read, err := ioutil.ReadAll(resp.Body)
if resp... | go | {
"resource": ""
} |
q172804 | Handler | validation | func (m *Messenger) Handler(rw http.ResponseWriter, req *http.Request) {
if req.Method == "GET" {
query := req.URL.Query()
if query.Get("hub.verify_token") != m.VerifyToken {
rw.WriteHeader(http.StatusUnauthorized)
return
}
rw.WriteHeader(http.StatusOK)
rw.Write([]byte(query.Get("hub.challenge")))
} e... | go | {
"resource": ""
} |
q172805 | DeleteGetStartedButton | validation | func (m *Messenger) DeleteGetStartedButton() error {
result, err := m.changeThreadSettings(http.MethodDelete, &threadSettings{
Type: settingTypeCallToActions,
State: threadStateNew,
})
if err != nil {
return err
}
if result.Result != "Successfully deleted all new_thread's CTAs" {
return fmt.Errorf("Error ... | go | {
"resource": ""
} |
q172806 | NewWebURLButton | validation | func NewWebURLButton(title string, url string) Button {
return Button{
Type: ButtonTypeWebURL,
Title: title,
URL: url,
}
} | go | {
"resource": ""
} |
q172807 | NewPostbackButton | validation | func NewPostbackButton(title string, payload string) Button {
return Button{
Type: ButtonTypePostback,
Title: title,
Payload: payload,
}
} | go | {
"resource": ""
} |
q172808 | NewPhoneNumberButton | validation | func NewPhoneNumberButton(title string, phone string) Button {
return Button{
Type: ButtonTypePhoneNumber,
Title: title,
Payload: phone,
}
} | go | {
"resource": ""
} |
q172809 | string__concat | validation | func string__concat(L *lua.State) int {
v1, t1 := luaToGoValue(L, 1)
v2, t2 := luaToGoValue(L, 2)
s1 := valueToString(L, v1)
s2 := valueToString(L, v2)
result := s1 + s2
if t1 == t2 || isPredeclaredType(t2) {
v := reflect.ValueOf(result)
makeValueProxy(L, v.Convert(t1), cStringMeta)
} else if isPredeclaredT... | go | {
"resource": ""
} |
q172810 | commonKind | validation | func commonKind(v1, v2 reflect.Value) reflect.Kind {
k1 := unsizedKind(v1)
k2 := unsizedKind(v2)
if k1 == k2 && (k1 == reflect.Uint64 || k1 == reflect.Int64) {
return k1
}
if k1 == reflect.Complex128 || k2 == reflect.Complex128 {
return reflect.Complex128
}
return reflect.Float64
} | go | {
"resource": ""
} |
q172811 | pushNumberValue | validation | func pushNumberValue(L *lua.State, a interface{}, t1, t2 reflect.Type) {
v := reflect.ValueOf(a)
isComplex := unsizedKind(v) == reflect.Complex128
mt := cNumberMeta
if isComplex {
mt = cComplexMeta
}
if t1 == t2 || isPredeclaredType(t2) {
makeValueProxy(L, v.Convert(t1), mt)
} else if isPredeclaredType(t1) {... | go | {
"resource": ""
} |
q172812 | unsizedKind | validation | func unsizedKind(v reflect.Value) reflect.Kind {
switch v.Kind() {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return reflect.Int64
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
return reflect.Uint64
case reflect.Float64, refl... | go | {
"resource": ""
} |
q172813 | luaToString | validation | func luaToString(L *lua.State, idx int) string {
switch L.Type(idx) {
case lua.LUA_TNUMBER:
L.PushValue(idx)
defer L.Pop(1)
return L.ToString(-1)
case lua.LUA_TSTRING:
return L.ToString(-1)
case lua.LUA_TBOOLEAN:
b := L.ToBoolean(idx)
if b {
return "true"
}
return "false"
case lua.LUA_TNIL:
re... | go | {
"resource": ""
} |
q172814 | mark | validation | func (v *visitor) mark(val reflect.Value) {
ptr := val.Pointer()
if ptr == 0 {
// We do not mark uninitialized 'val' as this is meaningless and this would
// bind all uninitialized values to the same mark.
return
}
v.L.RawGeti(lua.LUA_REGISTRYINDEX, v.index)
// Copy value on top.
v.L.PushValue(-2)
// Set ... | go | {
"resource": ""
} |
q172815 | push | validation | func (v *visitor) push(val reflect.Value) bool {
ptr := val.Pointer()
v.L.RawGeti(lua.LUA_REGISTRYINDEX, v.index)
v.L.RawGeti(-1, int(ptr))
if v.L.IsNil(-1) {
// Not visited.
v.L.Pop(2)
return false
}
v.L.Replace(-2)
return true
} | go | {
"resource": ""
} |
q172816 | copySliceToTable | validation | func copySliceToTable(L *lua.State, v reflect.Value, visited visitor) {
vp := v
for v.Kind() == reflect.Ptr {
// For arrays.
v = v.Elem()
}
n := v.Len()
L.CreateTable(n, 0)
if v.Kind() == reflect.Slice {
visited.mark(v)
} else if vp.Kind() == reflect.Ptr {
visited.mark(vp)
}
for i := 0; i < n; i++ {
... | go | {
"resource": ""
} |
q172817 | GoToLua | validation | func GoToLua(L *lua.State, a interface{}) {
visited := newVisitor(L)
goToLua(L, a, false, visited)
visited.close()
} | go | {
"resource": ""
} |
q172818 | NewLuaObject | validation | func NewLuaObject(L *lua.State, idx int) *LuaObject {
L.PushValue(idx)
ref := L.Ref(lua.LUA_REGISTRYINDEX)
return &LuaObject{l: L, ref: ref}
} | go | {
"resource": ""
} |
q172819 | NewLuaObjectFromName | validation | func NewLuaObjectFromName(L *lua.State, subfields ...interface{}) *LuaObject {
L.GetGlobal("_G")
defer L.Pop(1)
err := get(L, subfields...)
if err != nil {
return nil
}
val := NewLuaObject(L, -1)
L.Pop(1)
return val
} | go | {
"resource": ""
} |
q172820 | NewLuaObjectFromValue | validation | func NewLuaObjectFromValue(L *lua.State, val interface{}) *LuaObject {
GoToLua(L, val)
return NewLuaObject(L, -1)
} | go | {
"resource": ""
} |
q172821 | Close | validation | func (lo *LuaObject) Close() {
lo.l.Unref(lua.LUA_REGISTRYINDEX, lo.ref)
} | go | {
"resource": ""
} |
q172822 | Get | validation | func (lo *LuaObject) Get(a interface{}, subfields ...interface{}) error {
lo.Push()
defer lo.l.Pop(1)
err := get(lo.l, subfields...)
if err != nil {
return err
}
defer lo.l.Pop(1)
return LuaToGo(lo.l, -1, a)
} | go | {
"resource": ""
} |
q172823 | GetObject | validation | func (lo *LuaObject) GetObject(subfields ...interface{}) (*LuaObject, error) {
lo.Push()
defer lo.l.Pop(1)
err := get(lo.l, subfields...)
if err != nil {
return nil, err
}
val := NewLuaObject(lo.l, -1)
lo.l.Pop(1)
return val, nil
} | go | {
"resource": ""
} |
q172824 | Push | validation | func (lo *LuaObject) Push() {
lo.l.RawGeti(lua.LUA_REGISTRYINDEX, lo.ref)
} | go | {
"resource": ""
} |
q172825 | Setv | validation | func (lo *LuaObject) Setv(src *LuaObject, keys ...string) error {
// TODO: Rename? This function seems to be too specialized, is it worth
// keeping at all?
L := lo.l
if L != src.l {
return ErrLuaObjectUnsharedState
}
lo.Push()
defer L.Pop(1)
loIdx := L.GetTop()
var set func(int, string)
if L.IsTable(loIdx... | go | {
"resource": ""
} |
q172826 | Iter | validation | func (lo *LuaObject) Iter() (*LuaTableIter, error) {
L := lo.l
lo.Push()
defer L.Pop(1)
if L.IsTable(-1) {
return &LuaTableIter{lo: lo, keyRef: lua.LUA_NOREF, iterRef: lua.LUA_NOREF}, nil
} else if L.GetMetaField(-1, "__pairs") {
// __pairs(t) = iterator, t, first-key.
L.PushValue(-2)
// Only keep iterator... | go | {
"resource": ""
} |
q172827 | NewClient | validation | func NewClient(user, pass, resource, authType string) (*Client, error) {
return NewClientWithServerInfo(user, pass, resource, authType, defaultHost, defaultDomain, defaultConf)
} | go | {
"resource": ""
} |
q172828 | NewClientWithServerInfo | validation | func NewClientWithServerInfo(user, pass, resource, authType, host, domain, conf string) (*Client, error) {
connection, err := xmpp.Dial(host)
var b bytes.Buffer
if err := xml.EscapeText(&b, []byte(pass)); err != nil {
return nil, err
}
c := &Client{
AuthType: authType,
Username: user,
Password: b.String(... | go | {
"resource": ""
} |
q172829 | Status | validation | func (c *Client) Status(s string) {
c.connection.Presence(c.Id, s)
} | go | {
"resource": ""
} |
q172830 | Join | validation | func (c *Client) Join(roomId, resource string) {
c.connection.MUCPresence(roomId+"/"+resource, c.Id)
} | go | {
"resource": ""
} |
q172831 | Part | validation | func (c *Client) Part(roomId, name string) {
c.connection.MUCPart(roomId + "/" + name)
} | go | {
"resource": ""
} |
q172832 | Say | validation | func (c *Client) Say(roomId, name, body string) {
c.connection.MUCSend("groupchat", roomId, c.Id+"/"+name, body)
} | go | {
"resource": ""
} |
q172833 | PrivSay | validation | func (c *Client) PrivSay(user, name, body string) {
c.connection.MUCSend("chat", user, c.Id+"/"+name, body)
} | go | {
"resource": ""
} |
q172834 | KeepAlive | validation | func (c *Client) KeepAlive() {
for _ = range time.Tick(60 * time.Second) {
c.connection.KeepAlive()
}
} | go | {
"resource": ""
} |
q172835 | RequestRooms | validation | func (c *Client) RequestRooms() {
c.connection.Discover(c.Id, c.conf)
} | go | {
"resource": ""
} |
q172836 | RequestUsers | validation | func (c *Client) RequestUsers() {
c.connection.Roster(c.Id, c.domain)
} | go | {
"resource": ""
} |
q172837 | Copy | validation | func Copy(dst interface{}, src interface{}) error {
if dst == nil {
return fmt.Errorf("dst cannot be nil")
}
if src == nil {
return fmt.Errorf("src cannot be nil")
}
bytes, err := json.Marshal(src)
if err != nil {
return fmt.Errorf("Unable to marshal src: %s", err)
}
err = json.Unmarshal(bytes, dst)
if e... | go | {
"resource": ""
} |
q172838 | ToTable | validation | func (s StringData) ToTable() TabularData {
var tabData TabularData
lines := strings.Split(string(s), "\n")
for _, line := range lines {
row := strings.Split(line, "|")
row = row[1 : len(row)-1]
for i, c := range row {
row[i] = strings.TrimSpace(c)
}
tabData = append(tabData, row)
}
return tabData
} | go | {
"resource": ""
} |
q172839 | NumRows | validation | func (t TabularDataMap) NumRows() int {
if len(t) == 0 {
return 0
}
return len(t[reflect.ValueOf(t).MapKeys()[0].String()])
} | go | {
"resource": ""
} |
q172840 | LongestLine | validation | func (s *Scenario) LongestLine() int {
if s.longestLine == 0 {
s.longestLine = len("Scenario: " + s.Title)
for _, step := range s.Steps {
if l := len(string(step.Type) + " " + step.Text); l > s.longestLine {
s.longestLine = l
}
}
}
return s.longestLine
} | go | {
"resource": ""
} |
q172841 | LongestLine | validation | func (f *Feature) LongestLine() int {
if f.longestLine == 0 {
f.longestLine = len("Feature: " + f.Title)
for _, s := range f.Scenarios {
if l := s.LongestLine(); l > f.longestLine {
f.longestLine = l
}
}
}
return f.longestLine
} | go | {
"resource": ""
} |
q172842 | BuildAndRunDirWithGoBuildTags | validation | func BuildAndRunDirWithGoBuildTags(dir string, filters []string, goBuildTags string) error {
return buildAndRunDir(dir, filters, goBuildTags)
} | go | {
"resource": ""
} |
q172843 | assembleImportPath | validation | func assembleImportPath(file string) string {
a, _ := filepath.Abs(filepath.Dir(file))
absPath, fullPkg := filepath.ToSlash(a), ""
greedy := 0
for _, p := range filepath.SplitList(os.Getenv("GOPATH")) {
a, _ = filepath.Abs(p)
p = filepath.ToSlash(a)
symlink, _ := filepath.EvalSymlinks(p)
if (strings.HasPref... | go | {
"resource": ""
} |
q172844 | Sum | validation | func (d *digest) Sum(in []byte) []byte {
s := d.Sum64()
in = append(in, byte(s))
in = append(in, byte(s>>8))
in = append(in, byte(s>>16))
in = append(in, byte(s>>24))
in = append(in, byte(s>>32))
in = append(in, byte(s>>40))
in = append(in, byte(s>>48))
in = append(in, byte(s>>56))
return in
} | go | {
"resource": ""
} |
q172845 | Decode | validation | func Decode(r io.Reader, d Decoder) error {
decoder := &decode{d, make([]byte, 8), bufio.NewReader(r)}
return decoder.decode()
} | go | {
"resource": ""
} |
q172846 | retryPutPart | validation | func (lo *largeObject) retryPutPart(part *part) {
defer lo.wg.Done()
var err error
for i := 0; i < 3; i++ {
time.Sleep(time.Duration(math.Exp2(float64(i))) * 100 * time.Millisecond) // exponential back-off
err = lo.putPart(part)
if err == nil {
lo.bp.give <- part.b
return
}
lo.logger.Error(swiftLarge... | go | {
"resource": ""
} |
q172847 | putPart | validation | func (lo *largeObject) putPart(part *part) error {
container := lo.container
objectName := lo.objectName + "/" + lo.timestamp + "/" + fmt.Sprintf("%d", part.PartNumber)
lo.logger.Debug(swiftLargeObjectLogTag, "Upload Part: (", container, objectName, part.len, fmt.Sprintf("%x", part.contentMd5), part.ETag, ")")
if... | go | {
"resource": ""
} |
q172848 | abort | validation | func (lo *largeObject) abort() {
objects, err := lo.c.ObjectNamesAll(lo.container, nil)
if err != nil {
lo.logger.Error(swiftLargeObjectLogTag, fmt.Sprintf("Return all multipart objects: %v\n", err))
return
}
for _, object := range objects {
if strings.HasPrefix(object, lo.objectName+"/"+lo.timestamp+"/") {
... | go | {
"resource": ""
} |
q172849 | WaitInstanceUntilReady | validation | func (c *ClientManager) WaitInstanceUntilReady(id int, until time.Time) error {
for {
virtualGuest, found, err := c.GetInstance(id, "id, lastOperatingSystemReload[id,modifyDate], activeTransaction[id,transactionStatus.name], provisionDate, powerState.keyName")
if err != nil {
return err
}
if !found {
ret... | go | {
"resource": ""
} |
q172850 | FindPerformancePrice | validation | func FindPerformancePrice(productPackage datatypes.Product_Package, priceCategory string) (datatypes.Product_Item_Price, error) {
for _, item := range productPackage.Items {
for _, price := range item.Prices {
// Only collect prices from valid location groups.
if price.LocationGroupId != nil {
continue
... | go | {
"resource": ""
} |
q172851 | FindPerformanceSpacePrice | validation | func FindPerformanceSpacePrice(productPackage datatypes.Product_Package, size int) (datatypes.Product_Item_Price, error) {
for _, item := range productPackage.Items {
if int(*item.Capacity) != size {
continue
}
for _, price := range item.Prices {
// Only collect prices from valid location groups.
if pri... | go | {
"resource": ""
} |
q172852 | FindPerformanceIOPSPrice | validation | func FindPerformanceIOPSPrice(productPackage datatypes.Product_Package, size int, iops int) (datatypes.Product_Item_Price, error) {
for _, item := range productPackage.Items {
if int(*item.Capacity) != int(iops) {
continue
}
for _, price := range item.Prices {
// Only collect prices from valid location gro... | go | {
"resource": ""
} |
q172853 | WithTimeout | validation | func (o *FindVmsByStatesParams) WithTimeout(timeout time.Duration) *FindVmsByStatesParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172854 | WithContext | validation | func (o *FindVmsByStatesParams) WithContext(ctx context.Context) *FindVmsByStatesParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172855 | WithStates | validation | func (o *FindVmsByStatesParams) WithStates(states []string) *FindVmsByStatesParams {
o.SetStates(states)
return o
} | go | {
"resource": ""
} |
q172856 | WithPayload | validation | func (o *UpdateVMWithStateOK) WithPayload(payload string) *UpdateVMWithStateOK {
o.Payload = payload
return o
} | go | {
"resource": ""
} |
q172857 | WithTimeout | validation | func (o *OrderVMByFilterParams) WithTimeout(timeout time.Duration) *OrderVMByFilterParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172858 | WithContext | validation | func (o *OrderVMByFilterParams) WithContext(ctx context.Context) *OrderVMByFilterParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172859 | WithBody | validation | func (o *OrderVMByFilterParams) WithBody(body *models.VMFilter) *OrderVMByFilterParams {
o.SetBody(body)
return o
} | go | {
"resource": ""
} |
q172860 | Delete | validation | func (c *FakeClient) Delete(instanceID string) error {
c.DeleteCalled = true
return c.DeleteErr
} | go | {
"resource": ""
} |
q172861 | Fetch | validation | func (c *FakeClient) Fetch(instanceID string) (registry.AgentSettings, error) {
c.FetchCalled = true
return c.FetchSettings, c.FetchErr
} | go | {
"resource": ""
} |
q172862 | Update | validation | func (c *FakeClient) Update(instanceID string, agentSettings registry.AgentSettings) error {
c.UpdateCalled = true
c.UpdateSettings = agentSettings
return c.UpdateErr
} | go | {
"resource": ""
} |
q172863 | NewHTTPClient | validation | func NewHTTPClient(formats strfmt.Registry) *SoftLayerVMPool {
if formats == nil {
formats = strfmt.Default
}
transport := httptransport.New("vps.swagger.io", "/v2", []string{"http"})
return New(transport, formats)
} | go | {
"resource": ""
} |
q172864 | New | validation | func New(transport runtime.ClientTransport, formats strfmt.Registry) *SoftLayerVMPool {
cli := new(SoftLayerVMPool)
cli.Transport = transport
cli.VM = vm.New(transport, formats)
return cli
} | go | {
"resource": ""
} |
q172865 | SetTransport | validation | func (c *SoftLayerVMPool) SetTransport(transport runtime.ClientTransport) {
c.Transport = transport
c.VM.SetTransport(transport)
} | go | {
"resource": ""
} |
q172866 | Validate | validation | func (m *VmsResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateVms(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | {
"resource": ""
} |
q172867 | WithTimeout | validation | func (o *FindVmsByDeploymentParams) WithTimeout(timeout time.Duration) *FindVmsByDeploymentParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172868 | WithContext | validation | func (o *FindVmsByDeploymentParams) WithContext(ctx context.Context) *FindVmsByDeploymentParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172869 | WithDeployment | validation | func (o *FindVmsByDeploymentParams) WithDeployment(deployment []string) *FindVmsByDeploymentParams {
o.SetDeployment(deployment)
return o
} | go | {
"resource": ""
} |
q172870 | WithTimeout | validation | func (o *UpdateVMParams) WithTimeout(timeout time.Duration) *UpdateVMParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172871 | WithContext | validation | func (o *UpdateVMParams) WithContext(ctx context.Context) *UpdateVMParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172872 | WithBody | validation | func (o *UpdateVMParams) WithBody(body *models.VM) *UpdateVMParams {
o.SetBody(body)
return o
} | go | {
"resource": ""
} |
q172873 | NewAgentSettings | validation | func NewAgentSettings(agentID string, vmCID string, networksSettings NetworksSettings, env EnvSettings, agentOptions AgentOptions) AgentSettings {
agentSettings := AgentSettings{
AgentID: agentID,
Disks: DisksSettings{
Ephemeral: "",
Persistent: map[string]PersistentSettings{},
},
Blobstore: BlobstoreSe... | go | {
"resource": ""
} |
q172874 | ConfigureNetworks | validation | func (as AgentSettings) ConfigureNetworks(networksSettings NetworksSettings) AgentSettings {
as.Networks = networksSettings
return as
} | go | {
"resource": ""
} |
q172875 | DetachPersistentDisk | validation | func (as AgentSettings) DetachPersistentDisk(diskID string) AgentSettings {
persistenDiskSettings := as.Disks.Persistent
delete(persistenDiskSettings, diskID)
as.Disks.Persistent = persistenDiskSettings
return as
} | go | {
"resource": ""
} |
q172876 | Validate | validation | func (o ClientTLSOptions) Validate() error {
if o.CertFile == "" {
return bosherr.Error("Must provide a non-empty CertFile")
}
if o.KeyFile == "" {
return bosherr.Error("Must provide a non-empty KeyFile")
}
return nil
} | go | {
"resource": ""
} |
q172877 | WithTimeout | validation | func (o *FindVmsByFiltersParams) WithTimeout(timeout time.Duration) *FindVmsByFiltersParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172878 | WithContext | validation | func (o *FindVmsByFiltersParams) WithContext(ctx context.Context) *FindVmsByFiltersParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172879 | WithBody | validation | func (o *FindVmsByFiltersParams) WithBody(body *models.VMFilter) *FindVmsByFiltersParams {
o.SetBody(body)
return o
} | go | {
"resource": ""
} |
q172880 | WithTimeout | validation | func (o *DeleteVMParams) WithTimeout(timeout time.Duration) *DeleteVMParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172881 | WithContext | validation | func (o *DeleteVMParams) WithContext(ctx context.Context) *DeleteVMParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172882 | WithCid | validation | func (o *DeleteVMParams) WithCid(cid int32) *DeleteVMParams {
o.SetCid(cid)
return o
} | go | {
"resource": ""
} |
q172883 | WithPayload | validation | func (o *AddVMOK) WithPayload(payload string) *AddVMOK {
o.Payload = payload
return o
} | go | {
"resource": ""
} |
q172884 | Validate | validation | func (m State) Validate(formats strfmt.Registry) error {
var res []error
// value enum
if err := m.validateStateEnum("", "body", m); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | {
"resource": ""
} |
q172885 | WithTimeout | validation | func (o *UpdateVMWithStateParams) WithTimeout(timeout time.Duration) *UpdateVMWithStateParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172886 | WithContext | validation | func (o *UpdateVMWithStateParams) WithContext(ctx context.Context) *UpdateVMWithStateParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172887 | WithBody | validation | func (o *UpdateVMWithStateParams) WithBody(body *models.VMState) *UpdateVMWithStateParams {
o.SetBody(body)
return o
} | go | {
"resource": ""
} |
q172888 | WithCid | validation | func (o *UpdateVMWithStateParams) WithCid(cid int32) *UpdateVMWithStateParams {
o.SetCid(cid)
return o
} | go | {
"resource": ""
} |
q172889 | WithTimeout | validation | func (o *AddVMParams) WithTimeout(timeout time.Duration) *AddVMParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172890 | WithContext | validation | func (o *AddVMParams) WithContext(ctx context.Context) *AddVMParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172891 | WithBody | validation | func (o *AddVMParams) WithBody(body *models.VM) *AddVMParams {
o.SetBody(body)
return o
} | go | {
"resource": ""
} |
q172892 | Validate | validation | func (o AgentOptions) Validate() error {
if o.Mbus == "" {
return bosherr.Error("Must provide a non-empty Mbus")
}
err := o.Blobstore.Validate()
if err != nil {
return bosherr.WrapError(err, "Validating Blobstore configuration")
}
return nil
} | go | {
"resource": ""
} |
q172893 | WithTimeout | validation | func (o *ListVMParams) WithTimeout(timeout time.Duration) *ListVMParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172894 | WithContext | validation | func (o *ListVMParams) WithContext(ctx context.Context) *ListVMParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
q172895 | Validate | validation | func (m *Error) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateType(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | {
"resource": ""
} |
q172896 | WithPayload | validation | func (o *OrderVMByFilterOK) WithPayload(payload *models.VMResponse) *OrderVMByFilterOK {
o.Payload = payload
return o
} | go | {
"resource": ""
} |
q172897 | Validate | validation | func (m ErrorType) Validate(formats strfmt.Registry) error {
var res []error
// value enum
if err := m.validateErrorTypeEnum("", "body", m); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | {
"resource": ""
} |
q172898 | WithTimeout | validation | func (o *GetVMByCidParams) WithTimeout(timeout time.Duration) *GetVMByCidParams {
o.SetTimeout(timeout)
return o
} | go | {
"resource": ""
} |
q172899 | WithContext | validation | func (o *GetVMByCidParams) WithContext(ctx context.Context) *GetVMByCidParams {
o.SetContext(ctx)
return o
} | go | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.